diff options
| author | Ezekiel Gonzales <141341590+notsoeazy@users.noreply.github.com> | 2026-03-15 15:55:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-15 18:55:55 +1100 |
| commit | b68f0bae14227a4d65303654fef4801c76f57ac0 (patch) | |
| tree | 51ccf89eb184f271c0d243d6a6e077969b68736b /modules/controlcenter/taskbar/TaskbarPane.qml | |
| parent | bar/osicon: fix blurriness (#1271) (diff) | |
| download | caelestia-shell-b68f0bae14227a4d65303654fef4801c76f57ac0.tar.gz caelestia-shell-b68f0bae14227a4d65303654fef4801c76f57ac0.tar.bz2 caelestia-shell-b68f0bae14227a4d65303654fef4801c76f57ac0.zip | |
bar/activewindow: add compact option (#1201)
Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Diffstat (limited to 'modules/controlcenter/taskbar/TaskbarPane.qml')
| -rw-r--r-- | modules/controlcenter/taskbar/TaskbarPane.qml | 70 |
1 files changed, 51 insertions, 19 deletions
diff --git a/modules/controlcenter/taskbar/TaskbarPane.qml b/modules/controlcenter/taskbar/TaskbarPane.qml index 6c6b5e5..ba65c1e 100644 --- a/modules/controlcenter/taskbar/TaskbarPane.qml +++ b/modules/controlcenter/taskbar/TaskbarPane.qml @@ -19,6 +19,8 @@ Item { required property Session session + property bool activeWindowCompact: Config.bar.activeWindow.compact ?? false + property bool activeWindowInverted: Config.bar.activeWindow.inverted ?? false property bool clockShowIcon: Config.bar.clock.showIcon ?? true property bool persistent: Config.bar.persistent ?? true property bool showOnHover: Config.bar.showOnHover ?? true @@ -65,6 +67,8 @@ Item { } function saveConfig(entryIndex, entryEnabled) { + Config.bar.activeWindow.compact = root.activeWindowCompact; + Config.bar.activeWindow.inverted = root.activeWindowInverted; Config.bar.clock.showIcon = root.clockShowIcon; Config.bar.persistent = root.persistent; Config.bar.showOnHover = root.showOnHover; @@ -595,6 +599,34 @@ Item { } } } + + SectionContainer { + Layout.fillWidth: true + alignTop: true + + StyledText { + text: qsTr("Active window") + font.pointSize: Appearance.font.size.normal + } + + SwitchRow { + label: qsTr("Compact") + checked: root.activeWindowCompact + onToggled: checked => { + root.activeWindowCompact = checked; + root.saveConfig(); + } + } + + SwitchRow { + label: qsTr("Inverted") + checked: root.activeWindowInverted + onToggled: checked => { + root.activeWindowInverted = checked; + root.saveConfig(); + } + } + } } ColumnLayout { @@ -696,25 +728,25 @@ Item { rows: Math.ceil(root.monitorNames.length / 3) options: root.monitorNames.map(e => ({ - label: qsTr(e), - propertyName: `monitor${e}`, - onToggled: function (_) { - // if the given monitor is in the excluded list, it should be added back - let addedBack = excludedScreens.includes(e) - if (addedBack) { - const index = excludedScreens.indexOf(e); - if (index !== -1) { - excludedScreens.splice(index, 1); - } - } else { - if (!excludedScreens.includes(e)) { - excludedScreens.push(e); - } - } - root.saveConfig(); - }, - state: !Strings.testRegexList(root.excludedScreens, e) - })) + label: qsTr(e), + propertyName: `monitor${e}`, + onToggled: function (_) { + // if the given monitor is in the excluded list, it should be added back + let addedBack = excludedScreens.includes(e); + if (addedBack) { + const index = excludedScreens.indexOf(e); + if (index !== -1) { + excludedScreens.splice(index, 1); + } + } else { + if (!excludedScreens.includes(e)) { + excludedScreens.push(e); + } + } + root.saveConfig(); + }, + state: !Strings.testRegexList(root.excludedScreens, e) + })) } } } |