diff --git a/openbar@neuromorph/extension.js b/openbar@neuromorph/extension.js index 3c10813..2efb430 100644 --- a/openbar@neuromorph/extension.js +++ b/openbar@neuromorph/extension.js @@ -1464,11 +1464,6 @@ export default class Openbar extends Extension { } ); - // Apply the initial style - this.updatePanelStyle(null, 'enabled'); - let menustyle = this._settings.get_boolean('menustyle'); - this.applyMenuStyles(panel, menustyle); - // OpenBar runtime directory const userRunDir = GLib.get_user_runtime_dir(); this.obarRunDir = Gio.File.new_for_path(`${userRunDir}/io.github.neuromorph.openbar`); @@ -1499,6 +1494,17 @@ export default class Openbar extends Extension { // Add Open Bar Flatpak Overrides StyleSheets.saveFlatpakOverrides(this, 'enable'); + // Apply the initial style + this.updatePanelStyle(null, 'enabled'); + let menustyle = this._settings.get_boolean('menustyle'); + this.applyMenuStyles(panel, menustyle); + // Refresh to fix any indicators added during initial styling + this.enableStyleTimeoutId = setTimeout(() => { + this.updatePanelStyle(null, 'enabled'); + this.applyMenuStyles(panel, menustyle); + this.enableStyleTimeoutId = null; + }, 1000); + // Set initial Window Max Bar this.onWindowMaxBar(); @@ -1560,6 +1566,10 @@ export default class Openbar extends Extension { clearTimeout(this.postStartupId); this.postStartupId = null; } + if(this.enableStyleTimeoutId > 0) { + clearTimeout(this.enableStyleTimeoutId); + this.enableStyleTimeoutId = null; + } if(this.fittsEnableTimeoutId > 0) { clearTimeout(this.fittsEnableTimeoutId); this.fittsEnableTimeoutId = null;