mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Allow holding top panel delegate to trigger label action
This commit is contained in:
parent
bb3225d4b5
commit
da3d3c022f
1 changed files with 13 additions and 0 deletions
|
|
@ -68,6 +68,19 @@ ColumnLayout {
|
|||
root.closeRequested();
|
||||
}
|
||||
}
|
||||
onPressAndHold: {
|
||||
if (model.settingsCommand) {
|
||||
NanoShell.StartupFeedback.open(
|
||||
model.icon,
|
||||
model.text,
|
||||
icon.Kirigami.ScenePosition.x + icon.width/2,
|
||||
icon.Kirigami.ScenePosition.y + icon.height/2,
|
||||
Math.min(icon.width, icon.height))
|
||||
closeRequested();
|
||||
} else if (model.toggleFunction) {
|
||||
root[model.toggleFunction]();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue