mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-27 05:25:19 -04:00
48f6a0c632
* feat(bar): separate workspace appearance for unfocused displays Add a toggle in the Workspace Appearance card to style workspace indicators independently on displays that aren't currently focused. The card is split into Focused Display and Unfocused Display(s) tabs. When the new master toggle is off (default), unfocused displays inherit the focused settings, preserving existing behavior. When on, unfocused displays use their own colors (focused/occupied/unfocused/urgent) and focused border (enable, color, thickness). WorkspaceSwitcher resolves the focused monitor per compositor and routes color/border resolution through isFocusedMonitor/useUnfocusedAppearance. * refactor(bar): address review feedback for unfocused workspace appearance - Consolidate focused-monitor lookup into BarWidgetService.getFocusedScreenName(), adding Mango support, and drop the duplicate compositor switches in WorkspaceSwitcher (effectiveScreenName + isFocusedMonitor now use the helper). - Extract the shared color and border options into reusable WorkspaceAppearanceColorOptions and WorkspaceAppearanceBorderFields components so the focused and unfocused tabs no longer duplicate the layout. - Gate the unfocused-display options on BarWidgetService.focusedScreenDetectionSupported and show an explanatory note on compositors without focus detection (e.g. labwc), instead of silently no-opping.
43 lines
1.3 KiB
QML
43 lines
1.3 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import qs.Common
|
|
import qs.Modules.Settings.Widgets
|
|
|
|
Column {
|
|
id: root
|
|
|
|
property var borderColorOptions: []
|
|
property string borderColorKey: ""
|
|
property string borderCustomColorKey: ""
|
|
property string borderThicknessKey: ""
|
|
property var extraTags: []
|
|
|
|
width: parent?.width ?? 0
|
|
spacing: Theme.spacingS
|
|
leftPadding: Theme.spacingM
|
|
|
|
ColorDropdownRow {
|
|
width: parent.width - parent.leftPadding
|
|
text: I18n.tr("Border Color")
|
|
settingKey: root.borderColorKey
|
|
tags: ["workspace", "focused", "border", "color", "custom"].concat(root.extraTags)
|
|
options: root.borderColorOptions
|
|
currentMode: SettingsData[root.borderColorKey]
|
|
customColor: SettingsData[root.borderCustomColorKey] || "#6750A4"
|
|
onModeSelected: mode => SettingsData.set(root.borderColorKey, mode)
|
|
onCustomColorSelected: selectedColor => SettingsData.set(root.borderCustomColorKey, selectedColor.toString())
|
|
}
|
|
|
|
SettingsSliderRow {
|
|
width: parent.width - parent.leftPadding
|
|
text: I18n.tr("Thickness")
|
|
value: SettingsData[root.borderThicknessKey]
|
|
minimum: 1
|
|
maximum: 6
|
|
unit: "px"
|
|
defaultValue: 2
|
|
onSliderValueChanged: newValue => SettingsData.set(root.borderThicknessKey, newValue)
|
|
}
|
|
}
|