quickshell: init config
This commit is contained in:
parent
cbb594395a
commit
5e9c4e8e4c
20 changed files with 1650 additions and 0 deletions
57
modules/style/quickshell/shell/SysTray.qml
Normal file
57
modules/style/quickshell/shell/SysTray.qml
Normal file
|
@ -0,0 +1,57 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
required property var bar
|
||||
|
||||
width: parent.width
|
||||
height: column.height + 10
|
||||
color: "#30c0ffff"
|
||||
radius: 5
|
||||
border.color: "black"
|
||||
border.width: 2
|
||||
|
||||
RowLayout {
|
||||
id: column
|
||||
spacing: 10
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
Repeater {
|
||||
model: SystemTray.items
|
||||
|
||||
Item {
|
||||
id: item
|
||||
|
||||
required property SystemTrayItem modelData
|
||||
|
||||
height: 35
|
||||
width: 35
|
||||
|
||||
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