diff --git a/appIcons.js b/appIcons.js index 8a0278a..977bf51 100644 --- a/appIcons.js +++ b/appIcons.js @@ -245,6 +245,10 @@ var taskbarAppIcon = Utils.defineClass({ this._progressIndicator = new Progress.ProgressIndicator(this, panel.progressManager); }, + getDragActor: function() { + return this.app.create_icon_texture(this.dtpPanel.taskbar.iconSize); + }, + shouldShowTooltip: function() { if (!Me.settings.get_boolean('show-tooltip') || (!this.isLauncher && Me.settings.get_boolean("show-window-previews") && diff --git a/overview.js b/overview.js index 9320487..141b9cc 100644 --- a/overview.js +++ b/overview.js @@ -69,9 +69,6 @@ var dtpOverview = Utils.defineClass({ this._toggleDash(true); - // reset stored icon size to the default dash - Utils.setDashIconSize((Main.overview._overview._controls || Main.overview._controls).dash.iconSize); - // Remove key bindings this._disableHotKeys(); this._disableExtraShortcut(); diff --git a/panel.js b/panel.js index 5d5e31e..13b4cc2 100644 --- a/panel.js +++ b/panel.js @@ -302,7 +302,6 @@ var dtpPanel = Utils.defineClass({ this._timeoutsHandler.add([T1, 0, () => this.dynamicTransparency = new Transparency.DynamicTransparency(this)]); this.taskbar = new Taskbar.taskbar(this); - Utils.setDashIconSize(this.taskbar.iconSize); this.container.insert_child_above(this.taskbar.actor, null); @@ -332,32 +331,12 @@ var dtpPanel = Utils.defineClass({ 'changed', () => this._resetGeometry() ], - // Keep dragged icon consistent in size with this dash - [ - this.taskbar, - 'icon-size-changed', - Lang.bind(this, function() { - Utils.setDashIconSize(this.taskbar.iconSize); - }) - ], [ // sync hover after a popupmenu is closed this.taskbar, 'menu-closed', Lang.bind(this, function(){this.container.sync_hover();}) ], - // This duplicate the similar signal which is in overview.js. - // Being connected and thus executed later this effectively - // overwrite any attempt to use the size of the default dash - // which given the customization is usually much smaller. - // I can't easily disconnect the original signal - [ - (Main.overview._overview._controls || Main.overview._controls).dash, - 'icon-size-changed', - Lang.bind(this, function() { - Utils.setDashIconSize(this.taskbar.iconSize); - }) - ], [ Main.overview, [ @@ -447,9 +426,6 @@ var dtpPanel = Utils.defineClass({ this.taskbar.destroy(); - // reset stored icon size to the default dash - Utils.setDashIconSize((Main.overview._overview._controls || Main.overview._controls).dash.iconSize); - this.menuManager._changeMenu = this.menuManager._oldChangeMenu; this._myPanelGhost.get_parent().remove_actor(this._myPanelGhost); diff --git a/taskbar.js b/taskbar.js index ae4e2c2..6833a54 100644 --- a/taskbar.js +++ b/taskbar.js @@ -716,7 +716,6 @@ var taskbar = Utils.defineClass({ let scale = this.iconSize / availSize; this.iconSize = availSize; - this.emit('icon-size-changed'); for (let i = 0; i < iconChildren.length; i++) { let icon = iconChildren[i].child._delegate.icon; @@ -947,7 +946,9 @@ var taskbar = Utils.defineClass({ if (!this._settings.is_writable('favorite-apps')) return DND.DragMotionResult.NO_DROP; - if (!this._box.contains(source.actor) && !source._dashItemContainer) { + let sourceActor = source instanceof St.Widget ? source : source.actor; + + if (!this._box.contains(sourceActor) && !source._dashItemContainer) { //not an appIcon of the taskbar, probably from the applications view source._dashItemContainer = new DragPlaceholderItem(source, this.iconSize); this._box.insert_child_above(source._dashItemContainer, null); diff --git a/utils.js b/utils.js index f711c5e..677f224 100644 --- a/utils.js +++ b/utils.js @@ -430,14 +430,6 @@ var animateWindowOpacity = function(window, tweenOpts) { } }; -var setDashIconSize = function(size) { - if ('dash' in Main.overview) { - Main.overview.dash.iconSize = size; - } else { - Main.overview.dashIconSize = size; - } -}; - var getIndicators = function(delegate) { if (delegate instanceof St.BoxLayout) { return delegate;