quickshell work
This commit is contained in:
@@ -8,6 +8,10 @@ Item {
|
||||
width: 10 + rep.count * (2 * lay.spacing + 20)
|
||||
height: 30
|
||||
visible: SystemTray.items.values.length != 0
|
||||
|
||||
id: root
|
||||
property var window: null
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
@@ -23,7 +27,7 @@ Item {
|
||||
radius: 10
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
AbstractButton {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
Image {
|
||||
@@ -38,7 +42,15 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: console.log('clicked!')
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: (mouse) => {
|
||||
if(mouse.button == Qt.LeftButton) {
|
||||
SystemTray.items.values[index].activate()
|
||||
} else if(mouse.button == Qt.RightButton) {
|
||||
SystemTray.items.values[index].display(root.window, root.x + root.parent.x, 40)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user