quickshell: fix tray menu position
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
67a09b2a7f
commit
63bd64ec56
1 changed files with 3 additions and 1 deletions
|
|
@ -696,11 +696,13 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: trayMouse
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
onClicked: (event) => {
|
onClicked: (event) => {
|
||||||
if (event.button === Qt.RightButton && modelData.hasMenu) {
|
if (event.button === Qt.RightButton && modelData.hasMenu) {
|
||||||
modelData.display(bar, event.x, event.y);
|
let mapped = trayMouse.mapToItem(null, event.x, event.y);
|
||||||
|
modelData.display(trayPopup, mapped.x, mapped.y);
|
||||||
} else {
|
} else {
|
||||||
modelData.activate();
|
modelData.activate();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue