1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

add option to change occupied workspace color (#1427)

This commit is contained in:
Eggrror404
2026-01-19 02:25:37 +08:00
committed by GitHub
parent a685d9da52
commit 1adbf3937b
4 changed files with 68 additions and 1 deletions

View File

@@ -199,6 +199,46 @@ Item {
opacity: 0.15
}
SettingsButtonGroupRow {
text: I18n.tr("Occupied Color")
model: ["sec", "s", "sc", "sch", "none"]
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl
buttonHeight: 22
minButtonWidth: 36
buttonPadding: Theme.spacingS
checkIconSize: Theme.iconSizeSmall - 2
textSize: Theme.fontSizeSmall - 1
spacing: 1
currentIndex: {
switch (SettingsData.wokspaceColorMode) {
case "s":
return 1;
case "sc":
return 2;
case "sch":
return 3;
case "none":
return 4;
default:
return 0;
}
}
onSelectionChanged: (index, selected) => {
if (!selected)
return;
const modes = ["default", "s", "sc", "sch", "none"];
SettingsData.set("workspaceOccupiedColorMode", modes[index]);
}
}
Rectangle {
width: parent.width
height: 1
color: Theme.outline
opacity: 0.15
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl
}
SettingsButtonGroupRow {
text: I18n.tr("Unfocused Color")
model: ["def", "s", "sc", "sch"]