diff --git a/CoverflowAltTab@dmo60.de/platform.js b/CoverflowAltTab@dmo60.de/platform.js index 7d5cdae..5e502e7 100644 --- a/CoverflowAltTab@dmo60.de/platform.js +++ b/CoverflowAltTab@dmo60.de/platform.js @@ -69,17 +69,17 @@ AbstractPlatform.prototype = { elastic_mode: false, }; }, - + getPrimaryModifier: function(mask) { return imports.ui.altTab.primaryModifier(mask); }, - + initBackground: function() { this._background = Meta.BackgroundActor.new_for_screen(global.screen); this._background.hide(); global.overlay_group.add_actor(this._background); }, - + dimBackground: function() { this._background.show(); Tweener.addTween(this._background, { @@ -88,7 +88,7 @@ AbstractPlatform.prototype = { transition: TRANSITION_TYPE }); }, - + undimBackground: function(onCompleteBind) { Tweener.removeTweens(this._background); Tweener.addTween(this._background, { @@ -98,7 +98,7 @@ AbstractPlatform.prototype = { onComplete: onCompleteBind, }); }, - + removeBackground: function() { global.overlay_group.remove_actor(this._background); } @@ -209,10 +209,10 @@ PlatformCinnamon18.prototype = { this._settings.updateTitlePosition = function() { this.title_position = (this.titlePosition == 'Top' ? POSITION_TOP : POSITION_BOTTOM); }; - - + + let Settings = imports.ui.settings; - + // Init settings let extSettings = new Settings.ExtensionSettings(this._settings, "CoverflowAltTab@dmo60.de"); function noop() {} @@ -225,7 +225,7 @@ PlatformCinnamon18.prototype = { extSettings.bindProperty(Settings.BindingDirection.ONE_WAY, "enforce-primary-monitor", "enforce_primary_monitor", noop); extSettings.bindProperty(Settings.BindingDirection.ONE_WAY, "elastic-mode", "elastic_mode", noop); extSettings.bindProperty(Settings.BindingDirection.ONE_WAY, "switcher-style", "switcher_style", this._settings.updateSwitcherStyle); - + this._settings.updateSwitcherStyle(); this._settings.updateTitlePosition(); }, @@ -247,11 +247,11 @@ PlatformCinnamon18.prototype = { getSettings: function() { return this._settings; }, - + getPrimaryModifier: function(mask) { return imports.ui.appSwitcher.appSwitcher.primaryModifier(mask); } - + }; function PlatformGnomeShell() { @@ -350,14 +350,14 @@ PlatformGnomeShell38.prototype = { _init: function() { PlatformGnomeShell.prototype._init.apply(this, arguments); }, - + getPrimaryModifier: function(mask) { return imports.ui.switcherPopup.primaryModifier(mask); }, - + initBackground: function() { let Background = imports.ui.background; - + this._backgroundGroup = new Meta.BackgroundGroup(); global.overlay_group.add_child(this._backgroundGroup); this._backgroundGroup.hide(); @@ -366,10 +366,10 @@ PlatformGnomeShell38.prototype = { monitorIndex: i, }); } }, - + dimBackground: function() { let Background = imports.ui.background; - + this._backgroundGroup.show(); let backgrounds = this._backgroundGroup.get_children(); for (let i = 0; i < backgrounds.length; i++) { @@ -382,10 +382,10 @@ PlatformGnomeShell38.prototype = { }); } }, - + undimBackground: function(onCompleteBind) { let Background = imports.ui.background; - + let backgrounds = this._backgroundGroup.get_children(); for (let i = 0; i < backgrounds.length; i++) { let background = backgrounds[i]._delegate; @@ -398,7 +398,7 @@ PlatformGnomeShell38.prototype = { }); } }, - + removeBackground: function() { global.overlay_group.remove_child(this._backgroundGroup); } @@ -414,14 +414,14 @@ PlatformGnomeShell310.prototype = { _init: function() { PlatformGnomeShell.prototype._init.apply(this, arguments); }, - + getPrimaryModifier: function(mask) { return imports.ui.switcherPopup.primaryModifier(mask); }, - + initBackground: function() { let Background = imports.ui.background; - + this._backgroundGroup = new Meta.BackgroundGroup(); Main.uiGroup.add_child(this._backgroundGroup); this._backgroundGroup.lower_bottom(); @@ -431,10 +431,10 @@ PlatformGnomeShell310.prototype = { monitorIndex: i, }); } }, - + dimBackground: function() { let Background = imports.ui.background; - + this._backgroundGroup.show(); let backgrounds = this._backgroundGroup.get_children(); for (let i = 0; i < backgrounds.length; i++) { @@ -446,10 +446,10 @@ PlatformGnomeShell310.prototype = { }); } }, - + undimBackground: function(onCompleteBind) { let Background = imports.ui.background; - + let backgrounds = this._backgroundGroup.get_children(); for (let i = 0; i < backgrounds.length; i++) { let background = backgrounds[i]._delegate; @@ -461,7 +461,7 @@ PlatformGnomeShell310.prototype = { }); } }, - + removeBackground: function() { Main.uiGroup.remove_child(this._backgroundGroup); } @@ -479,52 +479,52 @@ PlatformGnomeShell314.prototype = { _init: function() { PlatformGnomeShell.prototype._init.apply(this, arguments); }, - + getPrimaryModifier: function(mask) { return imports.ui.switcherPopup.primaryModifier(mask); }, - + initBackground: function() { let Background = imports.ui.background; - + this._backgroundGroup = new Meta.BackgroundGroup(); - Main.uiGroup.add_child(this._backgroundGroup); - this._backgroundGroup.lower_bottom(); - this._backgroundGroup.hide(); - for (let i = 0; i < Main.layoutManager.monitors.length; i++) { - new Background.BackgroundManager({ container: this._backgroundGroup, - monitorIndex: i, }); - } + Main.layoutManager.uiGroup.add_child(this._backgroundGroup); + this._backgroundGroup.lower_bottom(); + this._backgroundGroup.hide(); + for (let i = 0; i < Main.layoutManager.monitors.length; i++) { + new Background.BackgroundManager({ container: this._backgroundGroup, + monitorIndex: i, + vignette: true }); + } }, - - dimBackground: function() { + + dimBackground: function() { this._backgroundGroup.show(); - let backgrounds = this._backgroundGroup.get_children(); - for (let i = 0; i < backgrounds.length; i++) { - let background = backgrounds[i]; - Tweener.addTween(background, - { brightness: this.getSettings().dim_factor, - time: this.getSettings().animation_time, - transition: TRANSITION_TYPE - }); - } + let backgrounds = this._backgroundGroup.get_children(); + for (let i = 0; i < backgrounds.length; i++) { + Tweener.addTween(backgrounds[i], + { brightness: 0.8, + vignette_sharpness: 1 - this.getSettings().dim_factor, + time: this.getSettings().animation_time, + transition: TRANSITION_TYPE + }); + } }, - - undimBackground: function(onCompleteBind) { - let backgrounds = this._backgroundGroup.get_children(); - for (let i = 0; i < backgrounds.length; i++) { - let background = backgrounds[i]; - Tweener.addTween(background, - { brightness: 1.0, - time: this.getSettings().animation_time, - transition: TRANSITION_TYPE, - onComplete: onCompleteBind, - }); - } + + undimBackground: function(onCompleteBind) { + let backgrounds = this._backgroundGroup.get_children(); + for (let i = 0; i < backgrounds.length; i++) { + Tweener.addTween(backgrounds[i], + { brightness: 1.0, + vignette_sharpness: 0.0, + time: this.getSettings().animation_time, + transition: TRANSITION_TYPE, + onComplete: onCompleteBind + }); + } }, - + removeBackground: function() { - Main.uiGroup.remove_child(this._backgroundGroup); + Main.layoutManager.uiGroup.remove_child(this._backgroundGroup); } }; -