tests: Fix gnome-shell theme import
The current import rule fails in two ways: - commitc62e7a6a
moved the theme's stylesheet to the builddir - since commit49c4ba56
, assets are addressed as resource:// URIs Fix both issues by loading and referencing the theme resource instead of the stylesheet itself. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
This commit is contained in:
parent
2bce1f1510
commit
b7f083b1da
@ -36,7 +36,7 @@ GJS_DEBUG_OUTPUT=stderr
|
|||||||
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
|
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
|
||||||
GNOME_SHELL_TESTSDIR="$srcdir/"
|
GNOME_SHELL_TESTSDIR="$srcdir/"
|
||||||
GNOME_SHELL_JS="$srcdir/../js"
|
GNOME_SHELL_JS="$srcdir/../js"
|
||||||
GNOME_SHELL_DATADIR="$srcdir/../data"
|
GNOME_SHELL_DATADIR="$builddir/../data"
|
||||||
|
|
||||||
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
|
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@import "../../data/theme/gnome-shell.css";
|
@import url("resource:///org/gnome/shell/theme/gnome-shell.css");
|
||||||
|
|
||||||
stage {
|
stage {
|
||||||
font: 16pt serif;
|
font: 16pt serif;
|
||||||
|
@ -14,6 +14,9 @@ const Environment = imports.ui.environment;
|
|||||||
|
|
||||||
function init(stage) {
|
function init(stage) {
|
||||||
Environment.init();
|
Environment.init();
|
||||||
|
let themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
|
||||||
|
themeResource._register();
|
||||||
|
|
||||||
let context = St.ThemeContext.get_for_stage(stage);
|
let context = St.ThemeContext.get_for_stage(stage);
|
||||||
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
|
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
|
||||||
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
|
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
|
||||||
|
Loading…
Reference in New Issue
Block a user