From 0596848c272a665e28374c5b132816b6dbb898a7 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 3 Jul 2019 13:29:20 -0300 Subject: [PATCH] appIcon: Use a real BaseIcon as the drag actor Moving an app icon to other positions is semantically different to dragging an actor to the dash; the act of moving should itself be semantic, in that we should feel like we are moving the actual icon. Currently, AppIcon gives the DnD code a simplified version of itself, with just its icon, instead of a complete copy with the label. Make AppIcon create a new IconGrid.BaseIcon and use it as the drag actor. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603 --- js/ui/appDisplay.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index c6a8b27e9..d89a41593 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2123,7 +2123,12 @@ var AppIcon = class AppIcon { } getDragActor() { - return this.app.create_icon_texture(Main.overview.dashIconSize); + let iconParams = { createIcon: this._createIcon.bind(this), + showLabel: (this.icon.label != null), + setSizeManually: true }; + let icon = new IconGrid.BaseIcon(this.name, iconParams); + icon.setIconSize(this.icon.iconSize); + return icon; } // Returns the original actor that should align with the actor