fix quickshell tray right click stupidly
This commit is contained in:
parent
772f030c79
commit
1cf7f41a69
1 changed files with 14 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
//@ pragma UseQApplication
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
|
@ -55,12 +56,24 @@ PanelWindow {
|
|||
id: hover_handler
|
||||
}
|
||||
|
||||
PopupWindow {
|
||||
id: menu_parent
|
||||
anchor.item: tray_item
|
||||
anchor.rect.y: tray_item.height
|
||||
anchor.rect.x: tray_item.width
|
||||
visible: true
|
||||
width: 1
|
||||
height: 1
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onTapped: (eventPoint, button) => {
|
||||
if (button == 1) {
|
||||
tray_item.modelData.activate();
|
||||
} else {
|
||||
tray_item.modelData.display(label, 0, 0);
|
||||
tray_item.modelData.display(menu_parent, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue