diff --git a/dynamic-panel-transparency@rockon999.github.io/events.js b/dynamic-panel-transparency@rockon999.github.io/events.js index 57f0655..6136be4 100644 --- a/dynamic-panel-transparency@rockon999.github.io/events.js +++ b/dynamic-panel-transparency@rockon999.github.io/events.js @@ -43,7 +43,6 @@ function init() { this._wm_tracker = Shell.WindowTracker.get_default(); - this._overviewHidingSig = Main.overview.connect('hiding', Lang.bind(this, Util.strip_args(Intellifade.syncCheck))); if (Settings.transition_with_overview()) { diff --git a/dynamic-panel-transparency@rockon999.github.io/extension.js b/dynamic-panel-transparency@rockon999.github.io/extension.js index 3492c0c..8ec23df 100644 --- a/dynamic-panel-transparency@rockon999.github.io/extension.js +++ b/dynamic-panel-transparency@rockon999.github.io/extension.js @@ -296,97 +296,13 @@ function initialize_settings() { key: 'unmaximized-opacity', name: 'unmaximized_opacity', type: 'i', - getter: 'get_unmaximized_opacity', - handler: Lang.bind(this, function() { - const super_id = this.opacity_update_id = Mainloop.timeout_add(SETTINGS_DELAY, Lang.bind(this, function() { - if (super_id !== this.opacity_update_id) { - return false; - } - - Theming.reapply_panel_background(); - - let theme = St.ThemeContext.get_for_stage(global.stage).get_theme(); - - for (let i = Theming.stylesheets.length - 1; i >= 0; i--) { - let stylesheet = Theming.stylesheets[i]; - if (stylesheet.contains('background') && stylesheet.contains('panel-')) { - Compatibility.st_theme_unload_stylesheet(theme, stylesheet); - Util.remove_file(stylesheet); - Theming.stylesheets.splice(i, 1); - } - } - - Theming.strip_panel_background(); - - const id = this.panel_color_update_id = Mainloop.timeout_add(SETTINGS_DELAY, Lang.bind(this, function() { // eslint-disable-line no-magic-numbers - if (id !== this.panel_color_update_id) { - return false; - } - - /* Get Rid of the Panel's CSS Background */ - // TODO: Figure out why it takes applying wierd "fake" style classes to get the real ones working... - - Theming.set_maximized_background_color((Math.random() * 100).toFixed(0)); - Theming.remove_background_color(); - Theming.set_unmaximized_background_color((Math.random() * 100).toFixed(0)); - Theming.remove_background_color(); - - Intellifade.forceSyncCheck(); - - return false; - })); - - return false; - })); - }) + getter: 'get_unmaximized_opacity' }); Settings.add({ key: 'maximized-opacity', name: 'maximized_opacity', type: 'i', - getter: 'get_maximized_opacity', - handler: Lang.bind(this, function() { - const super_id = this.opacity_update_id = Mainloop.timeout_add(SETTINGS_DELAY, Lang.bind(this, function() { - if (super_id !== this.opacity_update_id) { - return false; - } - - Theming.reapply_panel_background(); - - let theme = St.ThemeContext.get_for_stage(global.stage).get_theme(); - - for (let i = Theming.stylesheets.length - 1; i >= 0; i--) { - let stylesheet = Theming.stylesheets[i]; - if (stylesheet.contains('background') && stylesheet.contains('panel-')) { - Compatibility.st_theme_unload_stylesheet(theme, stylesheet); - Util.remove_file(stylesheet); - Theming.stylesheets.splice(i, 1); - } - } - - Theming.strip_panel_background(); - - const id = this.panel_color_update_id = Mainloop.timeout_add(SETTINGS_DELAY, Lang.bind(this, function() { // eslint-disable-line no-magic-numbers - if (id !== this.panel_color_update_id) { - return false; - } - - /* Get Rid of the Panel's CSS Background */ - // TODO: Figure out why it takes applying wierd "fake" style classes to get the real ones working... - - Theming.set_maximized_background_color((Math.random() * 100).toFixed(0)); - Theming.remove_background_color(); - Theming.set_unmaximized_background_color((Math.random() * 100).toFixed(0)); - Theming.remove_background_color(); - - Intellifade.forceSyncCheck(); - - return false; - })); - - return false; - })); - }) + getter: 'get_maximized_opacity' }); Settings.add({ key: 'panel-color', @@ -479,8 +395,6 @@ function initialize_settings() { return false; } - - /* Add Text Shadowing */ if (Settings.add_text_shadow()) { if (text_shadow !== null) { @@ -519,8 +433,6 @@ function initialize_settings() { return false; } - - /* Add Icon Shadowing */ if (Settings.add_icon_shadow()) { if (icon_shadow !== null) { @@ -560,8 +472,6 @@ function initialize_settings() { return false; } - - /* Add Icon Shadowing */ if (Settings.add_icon_shadow()) { if (icon_shadow !== null) { diff --git a/dynamic-panel-transparency@rockon999.github.io/prefs.js/preferences/main.js b/dynamic-panel-transparency@rockon999.github.io/prefs.js/preferences/main.js index 2ecc628..52c74bc 100644 --- a/dynamic-panel-transparency@rockon999.github.io/prefs.js/preferences/main.js +++ b/dynamic-panel-transparency@rockon999.github.io/prefs.js/preferences/main.js @@ -234,8 +234,6 @@ function buildPrefsWidget() { let position = settings.get_value(SETTINGS_TEXT_SHADOW_POSITION).deep_unpack(); position[HORIZONTAL_OFFSET] = widget.get_value_as_int(); settings.set_value(SETTINGS_TEXT_SHADOW_POSITION, new GLib.Variant('(iii)', position)); - - })); let text_shadow_radius = builder.get_object('text_shadow_radius'); @@ -244,9 +242,6 @@ function buildPrefsWidget() { let position = settings.get_value(SETTINGS_TEXT_SHADOW_POSITION).deep_unpack(); position[BLUR_RADIUS] = widget.get_value_as_int(); settings.set_value(SETTINGS_TEXT_SHADOW_POSITION, new GLib.Variant('(iii)', position)); - - - })); let text_shadow_color_btn = builder.get_object('text_shadow_color'); @@ -267,8 +262,6 @@ function buildPrefsWidget() { let rgba = [color.red, color.green, color.blue, alpha]; settings.set_value(SETTINGS_TEXT_SHADOW_COLOR, new GLib.Variant('(iiid)', rgba)); - - })); let icon_shadow = builder.get_object('icon_shadow_switch'); @@ -289,8 +282,6 @@ function buildPrefsWidget() { let position = settings.get_value(SETTINGS_ICON_SHADOW_POSITION).deep_unpack(); position[VERTICAL_OFFSET] = widget.get_value_as_int(); settings.set_value(SETTINGS_ICON_SHADOW_POSITION, new GLib.Variant('(iii)', position)); - - })); let icon_shadow_horizontal_offset = builder.get_object('icon_shadow_horizontal_offset'); icon_shadow_horizontal_offset.set_value(settings.get_value(SETTINGS_ICON_SHADOW_POSITION).deep_unpack()[HORIZONTAL_OFFSET]); @@ -298,8 +289,6 @@ function buildPrefsWidget() { let position = settings.get_value(SETTINGS_ICON_SHADOW_POSITION).deep_unpack(); position[HORIZONTAL_OFFSET] = widget.get_value_as_int(); settings.set_value(SETTINGS_ICON_SHADOW_POSITION, new GLib.Variant('(iii)', position)); - - })); let icon_shadow_radius = builder.get_object('icon_shadow_radius'); icon_shadow_radius.set_value(settings.get_value(SETTINGS_ICON_SHADOW_POSITION).deep_unpack()[BLUR_RADIUS]); @@ -307,9 +296,6 @@ function buildPrefsWidget() { let position = settings.get_value(SETTINGS_ICON_SHADOW_POSITION).deep_unpack(); position[BLUR_RADIUS] = widget.get_value_as_int(); settings.set_value(SETTINGS_ICON_SHADOW_POSITION, new GLib.Variant('(iii)', position)); - - - })); let icon_shadow_color_btn = builder.get_object('icon_shadow_color'); @@ -332,8 +318,6 @@ function buildPrefsWidget() { let rgba = [color.red, color.green, color.blue, alpha]; settings.set_value(SETTINGS_ICON_SHADOW_COLOR, new GLib.Variant('(iiid)', rgba)); - - })); }