summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--qml/StatusBar.qml12
-rw-r--r--qml/Systray.qml52
3 files changed, 64 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c388041..4f697b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,7 @@ set(PROJECT_QMLS
qml/DesktopGridView.qml
qml/StatusBar.qml
qml/SystrayView.qml
+ qml/Systray.qml
qml/VKeyboard.qml
)
diff --git a/qml/StatusBar.qml b/qml/StatusBar.qml
index 3758657..8f764c0 100644
--- a/qml/StatusBar.qml
+++ b/qml/StatusBar.qml
@@ -62,7 +62,7 @@ Rectangle {
anchors.left: backHome.right
anchors.top: parent.top
anchors.bottom: parent.bottom
- anchors.right: systrayview.left
+ anchors.right: systray.left
anchors.leftMargin: 4
anchors.topMargin: 4
clip: true
@@ -134,6 +134,16 @@ Rectangle {
}
}
+ Systray {
+ id: systray
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: systrayview.left
+ anchors.topMargin: 2
+ anchors.bottomMargin: 2
+ anchors.rightMargin: 2
+ }
+
SystrayView {
id: systrayview
anchors.top: parent.top
diff --git a/qml/Systray.qml b/qml/Systray.qml
new file mode 100644
index 0000000..8fb92ce
--- /dev/null
+++ b/qml/Systray.qml
@@ -0,0 +1,52 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import org.kazoe.xdg 1.0
+
+Rectangle {
+ color: "transparent"
+ width: view.contentWidth
+ height: systrayView.height
+
+ StatusNotifierHost {
+ id: systrayModel
+ }
+
+ ListView {
+ id: view
+ orientation: ListView.Horizontal
+ anchors.fill: parent
+ anchors.margins: 2
+ model: systrayModel
+ delegate: Rectangle {
+ visible: iconName.length && status !== "Passive"
+ height: view.height
+ width: visible ? height : 0
+ color: "transparent"
+
+ IconImage {
+ anchors.fill: parent
+ name: iconName
+ color: "transparent"
+ }
+
+ IconImage {
+ id: overlay
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ width: parent.width / 2
+ height: parent.height / 2
+ visible: overlayIconName.length
+ name: overlayIconName
+ color: "transparent"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ systrayModel.activate(0, 0, idItem, 0)
+ }
+ }
+ }
+ }
+}