Fix extension styling

St.Theme.load_stylesheet() does not queue a theme context change, so
any styling of widgets created before will not be updated. To fix this,
load the stylesheet before the extension builds its own UI in enable()

https://bugzilla.gnome.org/show_bug.cgi?id=682128
This commit is contained in:
Giovanni Campagna 2012-09-13 22:26:11 +02:00
parent e71129aa68
commit 77c15b76b5

View File

@ -106,8 +106,6 @@ function enableExtension(uuid) {
extensionOrder.push(uuid);
extension.stateObj.enable();
let stylesheetFile = extension.dir.get_child('stylesheet.css');
if (stylesheetFile.query_exists(null)) {
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
@ -115,6 +113,8 @@ function enableExtension(uuid) {
extension.stylesheet = stylesheetFile;
}
extension.stateObj.enable();
extension.state = ExtensionState.ENABLED;
_signals.emit('extension-state-changed', extension);
}