progress
This commit is contained in:
parent
35524b5e6e
commit
b750421f65
6 changed files with 435 additions and 34 deletions
35
SysTray.qml
35
SysTray.qml
|
@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
|
||||
|
@ -10,14 +11,11 @@ Rectangle {
|
|||
id: root
|
||||
required property var bar
|
||||
|
||||
Column {
|
||||
id: column
|
||||
spacing: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 5
|
||||
}
|
||||
ColumnLayout {
|
||||
id: column
|
||||
spacing: 35
|
||||
|
||||
Repeater {
|
||||
model: SystemTray.items
|
||||
|
@ -27,8 +25,29 @@ Rectangle {
|
|||
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
implicitHeight: width
|
||||
Item {
|
||||
height: 30
|
||||
width: 30
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Image {
|
||||
source: item.modelData.icon
|
||||
anchors.fill: parent
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: function (mouse) {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
item.modelData.activate();
|
||||
}
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
if (item.modelData.hasMenu) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue