mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Highlight favorites while dragging appIcons
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
12
taskbar.js
12
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++)
|
||||
|
||||
Reference in New Issue
Block a user