fix stuff in Tray.qml
This commit is contained in:
parent
50922f2701
commit
0ed269f728
1 changed files with 9 additions and 8 deletions
|
|
@ -7,27 +7,28 @@ import QtQuick.Layouts
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
||||||
Item {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
visible: iconRepeater.count != 0
|
visible: iconRepeater.count != 0
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
required property double moduleHeight
|
required property double moduleHeight
|
||||||
implicitHeight: moduleHeight
|
implicitHeight: moduleHeight
|
||||||
implicitWidth: iconlayout.implicitWidth
|
implicitWidth: iconlayout.width + 16
|
||||||
|
color: Colors.base01
|
||||||
|
radius: Config.rounding
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: iconlayout
|
id: iconlayout
|
||||||
anchors.centerIn: root
|
anchors.centerIn: root
|
||||||
|
spacing: 8
|
||||||
Repeater {
|
Repeater {
|
||||||
id: iconRepeater
|
id: iconRepeater
|
||||||
model: SystemTray.items
|
model: SystemTray.items
|
||||||
delegate: Rectangle {
|
delegate: Item {
|
||||||
id: iconWrapper
|
id: iconWrapper
|
||||||
color: Colors.base01
|
|
||||||
required property var modelData
|
required property var modelData
|
||||||
implicitWidth: root.moduleHeight + 8
|
implicitWidth: 16
|
||||||
implicitHeight: root.moduleHeight
|
implicitHeight: 16
|
||||||
radius: Config.rounding
|
|
||||||
IconImage {
|
IconImage {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: iconWrapper.modelData.icon
|
source: iconWrapper.modelData.icon
|
||||||
|
|
@ -39,7 +40,7 @@ Item {
|
||||||
menu: iconWrapper.modelData.menu
|
menu: iconWrapper.modelData.menu
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
onClicked: mouse => {
|
onClicked: mouse => {
|
||||||
if (mouse.button == Qt.RightButton) {
|
if (mouse.button == Qt.RightButton) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue