mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
don't trigger wallpaper config when pressing on favorites
This commit is contained in:
parent
46f8a90371
commit
e3913eb107
2 changed files with 9 additions and 16 deletions
|
|
@ -12,19 +12,7 @@ Item {
|
|||
property bool isDropTarget: delegateRoot != dragDelegate && root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole == modelData.ApplicationStorageIdRole
|
||||
|
||||
opacity: isDropTarget ? 0.3 : 1
|
||||
|
||||
/*function syncDropTarget() {
|
||||
if (isDropTarget) {
|
||||
var pos = mapToItem(root, x, y);
|
||||
dragDelegate.xTarget = pos.x;
|
||||
dragDelegate.yTarget = pos.y;
|
||||
print("AAAAA"+pos.x+" "+pos.x+" "+delegateRoot)
|
||||
}
|
||||
}
|
||||
onIsDropTargetChanged: syncDropTarget();
|
||||
onXChanged: syncDropTarget();
|
||||
onYChanged: syncDropTarget();*/
|
||||
|
||||
onModelDataChanged:print("AAAA");
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
anchors.centerIn: parent
|
||||
|
|
|
|||
|
|
@ -228,9 +228,11 @@ MouseEventListener {
|
|||
}
|
||||
onReleased: {
|
||||
applicationsView.interactive = true;
|
||||
dragDelegate.xTarget = Math.floor(mouse.x / root.buttonHeight) * root.buttonHeight
|
||||
dragDelegate.yTarget = Math.floor(mouse.y / root.buttonHeight) * root.buttonHeight
|
||||
dragDelegate.xTarget = Math.floor(mouse.x / root.buttonHeight) * root.buttonHeight;
|
||||
dragDelegate.yTarget = Math.floor(mouse.y / root.buttonHeight) * root.buttonHeight;
|
||||
dragDelegate.opacity = 0;
|
||||
dragDelegate.modelData.ApplicationIconRole = "";
|
||||
dragDelegate.modelDataChanged();
|
||||
applicationsView.dragData = null;
|
||||
root.reorderingApps = false;
|
||||
applicationsView.forceLayout();
|
||||
|
|
@ -403,7 +405,10 @@ MouseEventListener {
|
|||
property int margin: stripe.height + units.gridUnit * 2
|
||||
|
||||
onPressAndHold: {
|
||||
plasmoid.action("configure").trigger();
|
||||
print(favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y)))
|
||||
if (!favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y))) {
|
||||
plasmoid.action("configure").trigger();
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
Loading…
Reference in a new issue