tray: accessibility: bigger size, config option for monochrome

This commit is contained in:
end-4
2025-06-17 00:18:12 +02:00
parent 2c90de7375
commit 36e87fe71f
2 changed files with 21 additions and 12 deletions
@@ -13,7 +13,7 @@ MouseArea {
required property var bar required property var bar
required property SystemTrayItem item required property SystemTrayItem item
property bool targetMenuOpen: false property bool targetMenuOpen: false
property int trayItemWidth: 16 property int trayItemWidth: Appearance.font.pixelSize.larger
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
Layout.fillHeight: true Layout.fillHeight: true
@@ -43,17 +43,21 @@ MouseArea {
IconImage { IconImage {
id: trayIcon id: trayIcon
visible: false // There's already color overlay visible: !ConfigOptions.bar.tray.monochromeIcons
source: root.item.icon source: root.item.icon
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width width: parent.width
height: parent.height height: parent.height
} }
Loader {
active: ConfigOptions.bar.tray.monochromeIcons
anchors.fill: trayIcon
sourceComponent: Item {
Desaturate { Desaturate {
id: desaturatedIcon id: desaturatedIcon
visible: false // There's already color overlay visible: false // There's already color overlay
anchors.fill: trayIcon anchors.fill: parent
source: trayIcon source: trayIcon
desaturation: 1 // 1.0 means fully grayscale desaturation: 1 // 1.0 means fully grayscale
} }
@@ -62,5 +66,7 @@ MouseArea {
source: desaturatedIcon source: desaturatedIcon
color: ColorUtils.transparentize(Appearance.colors.colOnLayer0, 0.6) color: ColorUtils.transparentize(Appearance.colors.colOnLayer0, 0.6)
} }
}
}
} }
@@ -62,6 +62,9 @@ Singleton {
property bool showMicToggle: false property bool showMicToggle: false
property bool showKeyboardToggle: true property bool showKeyboardToggle: true
} }
property QtObject tray: QtObject {
property bool monochromeIcons: true
}
property QtObject workspaces: QtObject { property QtObject workspaces: QtObject {
property int shown: 10 property int shown: 10
property bool showAppIcons: true property bool showAppIcons: true