From 77c15b76b592d4efa74a251618af671f9f58a52a Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 13 Sep 2012 22:26:11 +0200 Subject: [PATCH] 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 --- js/ui/extensionSystem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index 6129370ec..4512fdad6 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -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); }