sessionMode: Add extraStylesheet property
Add a sessionMode.extraStylesheet property, which may be used for mode-specific style information. https://bugzilla.gnome.org/show_bug.cgi?id=676156
This commit is contained in:
parent
c25e7f3c41
commit
b5b13322d8
@ -71,7 +71,6 @@ let networkAgent = null;
|
|||||||
let _startDate;
|
let _startDate;
|
||||||
let _defaultCssStylesheet = null;
|
let _defaultCssStylesheet = null;
|
||||||
let _cssStylesheet = null;
|
let _cssStylesheet = null;
|
||||||
let _gdmCssStylesheet = null;
|
|
||||||
let _overridesSettings = null;
|
let _overridesSettings = null;
|
||||||
|
|
||||||
let background = null;
|
let background = null;
|
||||||
@ -166,7 +165,6 @@ function start() {
|
|||||||
global.stage.no_clear_hint = true;
|
global.stage.no_clear_hint = true;
|
||||||
|
|
||||||
_defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
|
_defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
|
||||||
_gdmCssStylesheet = global.datadir + '/theme/gdm.css';
|
|
||||||
loadTheme();
|
loadTheme();
|
||||||
|
|
||||||
// Set up stage hierarchy to group all UI actors under one container.
|
// Set up stage hierarchy to group all UI actors under one container.
|
||||||
@ -494,8 +492,8 @@ function loadTheme() {
|
|||||||
|
|
||||||
let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
|
let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
|
||||||
|
|
||||||
if (sessionMode.sessionType == Shell.SessionType.GDM)
|
if (sessionMode.extraStylesheet)
|
||||||
theme.load_stylesheet(_gdmCssStylesheet);
|
theme.load_stylesheet(sessionMode.extraStylesheet);
|
||||||
|
|
||||||
if (previousTheme) {
|
if (previousTheme) {
|
||||||
let customStylesheets = previousTheme.get_custom_stylesheets();
|
let customStylesheets = previousTheme.get_custom_stylesheets();
|
||||||
|
@ -18,6 +18,7 @@ const _modes = {
|
|||||||
hasRunDialog: false,
|
hasRunDialog: false,
|
||||||
hasWorkspaces: false,
|
hasWorkspaces: false,
|
||||||
createSession: Main.createGDMSession,
|
createSession: Main.createGDMSession,
|
||||||
|
extraStylesheet: global.datadir + '/theme/gdm.css',
|
||||||
sessionType: Shell.SessionType.GDM },
|
sessionType: Shell.SessionType.GDM },
|
||||||
|
|
||||||
'user': { hasOverview: true,
|
'user': { hasOverview: true,
|
||||||
@ -29,6 +30,7 @@ const _modes = {
|
|||||||
hasRunDialog: true,
|
hasRunDialog: true,
|
||||||
hasWorkspaces: true,
|
hasWorkspaces: true,
|
||||||
createSession: Main.createUserSession,
|
createSession: Main.createUserSession,
|
||||||
|
extraStylesheet: null,
|
||||||
sessionType: Shell.SessionType.USER }
|
sessionType: Shell.SessionType.USER }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user