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
+18 -12
View File
@@ -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,24 +43,30 @@ 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
} }
Desaturate { Loader {
id: desaturatedIcon active: ConfigOptions.bar.tray.monochromeIcons
visible: false // There's already color overlay
anchors.fill: trayIcon anchors.fill: trayIcon
source: trayIcon sourceComponent: Item {
desaturation: 1 // 1.0 means fully grayscale Desaturate {
} id: desaturatedIcon
ColorOverlay { visible: false // There's already color overlay
anchors.fill: desaturatedIcon anchors.fill: parent
source: desaturatedIcon source: trayIcon
color: ColorUtils.transparentize(Appearance.colors.colOnLayer0, 0.6) desaturation: 1 // 1.0 means fully grayscale
}
ColorOverlay {
anchors.fill: desaturatedIcon
source: desaturatedIcon
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