mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
apporder reflects favorites
keep in sync the first items of apporder which will always be favorites. this should fix the favorites spontaeous reordering that sometimes happen
This commit is contained in:
parent
b81d29d2c2
commit
5814fd9696
1 changed files with 12 additions and 4 deletions
|
|
@ -67,6 +67,12 @@ Item {
|
|||
|
||||
//END functions
|
||||
|
||||
|
||||
FastBlur {
|
||||
anchors.fill: parent
|
||||
source: wallpaper
|
||||
radius: 32
|
||||
}
|
||||
property bool componentComplete: false
|
||||
onWidthChanged: recalculateMaxFavoriteCount()
|
||||
onHeightChanged:recalculateMaxFavoriteCount()
|
||||
|
|
@ -245,8 +251,9 @@ Item {
|
|||
return;
|
||||
}
|
||||
|
||||
plasmoid.nativeInterface.applicationListModel.addFavorite(storageId, 0, ApplicationListModel.Favorites)
|
||||
let item = launcherRepeater.itemAt(0);
|
||||
let pos = Math.min(plasmoid.nativeInterface.applicationListModel.count, Math.floor(posInFavorites.x/favoriteStrip.cellWidth))
|
||||
plasmoid.nativeInterface.applicationListModel.addFavorite(storageId, pos, ApplicationListModel.Favorites)
|
||||
let item = launcherRepeater.itemAt(pos);
|
||||
|
||||
if (item) {
|
||||
item.x = posInFavorites.x;
|
||||
|
|
@ -260,8 +267,9 @@ Item {
|
|||
}
|
||||
|
||||
|
||||
plasmoid.nativeInterface.applicationListModel.addFavorite(storageId, 0, ApplicationListModel.Desktop)
|
||||
let item = launcherRepeater.itemAt(0);
|
||||
let pos = plasmoid.nativeInterface.applicationListModel.count;
|
||||
plasmoid.nativeInterface.applicationListModel.addFavorite(storageId, pos, ApplicationListModel.Desktop)
|
||||
let item = launcherRepeater.itemAt(pos);
|
||||
|
||||
event.accept(event.proposedAction);
|
||||
if (item) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue