diff --git a/stylesheet.css b/stylesheet.css index 2809f6c..305f669 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -49,6 +49,10 @@ background-color: rgba(238, 238, 236, 0.1); } +#dashtopanelScrollview .app-well-app .favorite { + background-color: rgba(80, 150, 255, 0.4); +} + #dashtopanelScrollview .app-well-app-running-dot { margin-bottom: 0; } diff --git a/taskbar.js b/taskbar.js index 7f884e3..dd08c8e 100644 --- a/taskbar.js +++ b/taskbar.js @@ -391,6 +391,8 @@ var taskbar = new Lang.Class({ this._box.insert_child_at_index(this._emptyDropTarget, 0); this._emptyDropTarget.show(true); } + + this._toggleFavortieHighlight(true); }, _onDragCancelled: function() { @@ -415,6 +417,8 @@ var taskbar = new Lang.Class({ this._clearEmptyDropTarget(); this._showAppsIcon.setDragApp(null); DND.removeDragMonitor(this._dragMonitor); + + this._toggleFavortieHighlight(); }, _onDragMotion: function(dragEvent) { @@ -432,6 +436,14 @@ var taskbar = new Lang.Class({ return DND.DragMotionResult.CONTINUE; }, + _toggleFavortieHighlight: function(show) { + let appFavorites = AppFavorites.getAppFavorites(); + let cssFuncName = (show ? 'add' : 'remove') + '_style_class_name'; + + this._getAppIcons().filter(appIcon => appFavorites.isFavorite(appIcon.app.get_id())) + .forEach(fav => fav._container[cssFuncName]('favorite')); + }, + _appIdListToHash: function(apps) { let ids = {}; for (let i = 0; i < apps.length; i++)