diff --git a/config/BarConfig.qml b/config/BarConfig.qml index 90d26eb2..cdaaf7e0 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -12,6 +12,7 @@ Singleton { readonly property Sizes sizes: Sizes {} readonly property Workspaces workspaces: Workspaces {} + readonly property Tray tray: Tray {} readonly property Presets presets: Presets {} component Sizes: QtObject { @@ -27,6 +28,10 @@ Singleton { readonly property bool occupiedBg: true } + component Tray: QtObject { + readonly property bool recolourIcons: false + } + component Preset: QtObject { required property string name required property int totalHeight diff --git a/modules/bar/Pills.qml b/modules/bar/Pills.qml index 503de024..8a329b9b 100644 --- a/modules/bar/Pills.qml +++ b/modules/bar/Pills.qml @@ -57,6 +57,25 @@ Item { } Pill { + anchors.right: rightPill.left + anchors.rightMargin: Appearance.padding.normal + + Tray { + vertical: BarConfig.vertical + + anchors.left: root.get(clock.right, undefined) + anchors.leftMargin: root.get(Appearance.padding.large, 0) + anchors.top: root.get(undefined, clock.bottom) + anchors.topMargin: root.get(0, Appearance.padding.large) + + anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter) + anchors.verticalCenter: root.get(parent.verticalCenter, undefined) + } + } + + Pill { + id: rightPill + anchors.right: parent.right Clock { @@ -68,11 +87,7 @@ Item { anchors.verticalCenter: root.get(parent.verticalCenter, undefined) } - Tray { - id: tray - - vertical: BarConfig.vertical - + StatusIcons { anchors.left: root.get(clock.right, undefined) anchors.leftMargin: root.get(Appearance.padding.large, 0) anchors.top: root.get(undefined, clock.bottom) @@ -81,16 +96,6 @@ Item { anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter) anchors.verticalCenter: root.get(parent.verticalCenter, undefined) } - - StatusIcons { - anchors.left: root.get(tray.right, undefined) - anchors.leftMargin: root.get(Appearance.padding.large, 0) - anchors.top: root.get(undefined, tray.bottom) - anchors.topMargin: root.get(0, Appearance.padding.large) - - anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter) - anchors.verticalCenter: root.get(parent.verticalCenter, undefined) - } } } diff --git a/modules/bar/components/Tray.qml b/modules/bar/components/Tray.qml index 37de73b4..8aaa533c 100644 --- a/modules/bar/components/Tray.qml +++ b/modules/bar/components/Tray.qml @@ -43,12 +43,13 @@ StyledRect { IconImage { id: icon - visible: false + visible: !BarConfig.tray.recolourIcons source: item.modelData.icon anchors.fill: parent } ColorOverlay { + visible: BarConfig.tray.recolourIcons anchors.fill: icon source: icon color: Appearance.colours.lavender