main: Allow loading file-based stylesheets again
The gnome-classic mode ships a stylesheet on disk, so make sure to load that if if we can't find any file in the resource itself.
This commit is contained in:
parent
0f63ad0fc1
commit
48a6e6f309
@ -227,11 +227,25 @@ function _initializeUI() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _getDefaultStylesheet() {
|
||||||
|
let stylesheet;
|
||||||
|
|
||||||
|
stylesheet = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/' + sessionMode.stylesheetName);
|
||||||
|
if (stylesheet.query_exists(null))
|
||||||
|
return stylesheet;
|
||||||
|
|
||||||
|
stylesheet = Gio.File.new_for_path(global.datadir + '/theme/' + sessionMode.stylesheetName);
|
||||||
|
if (stylesheet.query_exists(null))
|
||||||
|
return stylesheet;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
function _loadDefaultStylesheet() {
|
function _loadDefaultStylesheet() {
|
||||||
if (!sessionMode.isPrimary)
|
if (!sessionMode.isPrimary)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let stylesheet = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/' + sessionMode.stylesheetName);
|
let stylesheet = _getDefaultStylesheet();
|
||||||
if (_defaultCssStylesheet && _defaultCssStylesheet.equal(stylesheet))
|
if (_defaultCssStylesheet && _defaultCssStylesheet.equal(stylesheet))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user