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 SystemTrayItem item
property bool targetMenuOpen: false
property int trayItemWidth: 16
property int trayItemWidth: Appearance.font.pixelSize.larger
acceptedButtons: Qt.LeftButton | Qt.RightButton
Layout.fillHeight: true
@@ -43,24 +43,30 @@ MouseArea {
IconImage {
id: trayIcon
visible: false // There's already color overlay
visible: !ConfigOptions.bar.tray.monochromeIcons
source: root.item.icon
anchors.centerIn: parent
width: parent.width
height: parent.height
}
Desaturate {
id: desaturatedIcon
visible: false // There's already color overlay
Loader {
active: ConfigOptions.bar.tray.monochromeIcons
anchors.fill: trayIcon
source: trayIcon
desaturation: 1 // 1.0 means fully grayscale
}
ColorOverlay {
anchors.fill: desaturatedIcon
source: desaturatedIcon
color: ColorUtils.transparentize(Appearance.colors.colOnLayer0, 0.6)
sourceComponent: Item {
Desaturate {
id: desaturatedIcon
visible: false // There's already color overlay
anchors.fill: parent
source: trayIcon
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 showKeyboardToggle: true
}
property QtObject tray: QtObject {
property bool monochromeIcons: true
}
property QtObject workspaces: QtObject {
property int shown: 10
property bool showAppIcons: true