From f64986e7a5a91fa8732fde4f0333b4f5bb0aa954 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Mon, 5 Jan 2026 18:27:15 -0500 Subject: [PATCH] Settings: more subtabs work --- Assets/Translations/en.json | 4 +- Modules/Panels/Settings/SettingsContent.qml | 1 + .../Settings/Tabs/Bar/AppearanceSubTab.qml | 5 - .../Settings/Tabs/Bar/MonitorsSubTab.qml | 9 +- .../Settings/Tabs/Bar/WidgetsSubTab.qml | 12 +- .../Tabs/ControlCenter/AppearanceSubTab.qml | 5 - .../Tabs/ControlCenter/CardsSubTab.qml | 9 +- .../{ => ControlCenter}/ControlCenterTab.qml | 4 +- ...lWidgetsSubTab.qml => ShortcutsSubTab.qml} | 5 - .../Settings/Tabs/DesktopWidgetsTab.qml | 5 - .../Settings/Tabs/Dock/AppearanceSubTab.qml | 263 +++++++++--------- Modules/Panels/Settings/Tabs/Dock/DockTab.qml | 19 +- .../Settings/Tabs/Dock/MonitorsSubTab.qml | 25 +- .../Tabs/Wallpaper/AutomationSubTab.qml | 4 - .../{SettingsSubTab.qml => GeneralSubTab.qml} | 5 - .../Tabs/Wallpaper/LookAndFeelSubTab.qml | 4 - .../Settings/Tabs/Wallpaper/WallpaperTab.qml | 6 +- Services/Power/PowerProfileService.qml | 4 +- Services/System/ProgramCheckerService.qml | 4 +- 19 files changed, 171 insertions(+), 222 deletions(-) rename Modules/Panels/Settings/Tabs/{ => ControlCenter}/ControlCenterTab.qml (98%) rename Modules/Panels/Settings/Tabs/ControlCenter/{ControlWidgetsSubTab.qml => ShortcutsSubTab.qml} (95%) rename Modules/Panels/Settings/Tabs/Wallpaper/{SettingsSubTab.qml => GeneralSubTab.qml} (97%) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 52f4a3086..c273af6b8 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1444,7 +1444,7 @@ "tabs": { "appearance": "Appearance", "cards": "Cards", - "control-widgets": "Control Widgets" + "shortcuts": "Shortcuts" }, "title": "Control Center" }, @@ -2749,7 +2749,7 @@ "tabs": { "automation": "Automation", "look-feel": "Look & feel", - "settings": "Settings" + "general": "General" }, "title": "Wallpaper" } diff --git a/Modules/Panels/Settings/SettingsContent.qml b/Modules/Panels/Settings/SettingsContent.qml index 62680af19..1adcc63fd 100644 --- a/Modules/Panels/Settings/SettingsContent.qml +++ b/Modules/Panels/Settings/SettingsContent.qml @@ -7,6 +7,7 @@ import qs.Modules.Panels.Settings.Tabs import qs.Modules.Panels.Settings.Tabs.Audio import qs.Modules.Panels.Settings.Tabs.Bar import qs.Modules.Panels.Settings.Tabs.ColorScheme +import qs.Modules.Panels.Settings.Tabs.ControlCenter import qs.Modules.Panels.Settings.Tabs.Display import qs.Modules.Panels.Settings.Tabs.Dock import qs.Modules.Panels.Settings.Tabs.Notifications diff --git a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml index 91e5a3cbd..9425c03c3 100644 --- a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml @@ -9,11 +9,6 @@ ColumnLayout { spacing: Style.marginL Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.bar.appearance.section.label") - description: I18n.tr("settings.bar.appearance.section.description") - } - NComboBox { Layout.fillWidth: true label: I18n.tr("settings.bar.appearance.position.label") diff --git a/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml index b90bafccd..750398c9e 100644 --- a/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml @@ -14,11 +14,6 @@ ColumnLayout { property var addMonitor property var removeMonitor - NHeader { - label: I18n.tr("settings.bar.monitors.section.label") - description: I18n.tr("settings.bar.monitors.section.description") - } - Repeater { model: Quickshell.screens || [] delegate: NCheckbox { @@ -43,4 +38,8 @@ ColumnLayout { } } } + + NLabel { + description: I18n.tr("settings.bar.monitors.section.description") + } } diff --git a/Modules/Panels/Settings/Tabs/Bar/WidgetsSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/WidgetsSubTab.qml index 6bcc74288..ea483cf02 100644 --- a/Modules/Panels/Settings/Tabs/Bar/WidgetsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/WidgetsSubTab.qml @@ -20,14 +20,6 @@ ColumnLayout { signal openPluginSettings(var manifest) - NHeader { - label: I18n.tr("settings.bar.widgets.section.label") - } - - NLabel { - description: I18n.tr("settings.bar.widgets.section.description") - } - ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true @@ -81,5 +73,9 @@ ColumnLayout { onMoveWidget: (fromSection, index, toSection) => root.moveWidgetBetweenSections(fromSection, index, toSection) onOpenPluginSettingsRequested: manifest => root.openPluginSettings(manifest) } + + NLabel { + description: I18n.tr("settings.bar.widgets.section.description") + } } } diff --git a/Modules/Panels/Settings/Tabs/ControlCenter/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/ControlCenter/AppearanceSubTab.qml index b090d97b0..d455da41e 100644 --- a/Modules/Panels/Settings/Tabs/ControlCenter/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ControlCenter/AppearanceSubTab.qml @@ -17,11 +17,6 @@ ColumnLayout { spacing: Style.marginL Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.control-center.section.label") - description: I18n.tr("settings.control-center.section.description") - } - NComboBox { id: controlCenterPosition label: I18n.tr("settings.control-center.position.label") diff --git a/Modules/Panels/Settings/Tabs/ControlCenter/CardsSubTab.qml b/Modules/Panels/Settings/Tabs/ControlCenter/CardsSubTab.qml index f818fa275..0b5d94354 100644 --- a/Modules/Panels/Settings/Tabs/ControlCenter/CardsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ControlCenter/CardsSubTab.qml @@ -31,11 +31,6 @@ ColumnLayout { spacing: Style.marginXXS Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.control-center.cards.section.label") - description: I18n.tr("settings.control-center.cards.section.description") - } - Connections { target: Settings.data.location function onWeatherEnabledChanged() { @@ -76,7 +71,7 @@ ColumnLayout { } } - Rectangle { - Layout.fillHeight: true + NLabel { + description: I18n.tr("settings.control-center.cards.section.description") } } diff --git a/Modules/Panels/Settings/Tabs/ControlCenterTab.qml b/Modules/Panels/Settings/Tabs/ControlCenter/ControlCenterTab.qml similarity index 98% rename from Modules/Panels/Settings/Tabs/ControlCenterTab.qml rename to Modules/Panels/Settings/Tabs/ControlCenter/ControlCenterTab.qml index 2cdc245c4..fc7305237 100644 --- a/Modules/Panels/Settings/Tabs/ControlCenterTab.qml +++ b/Modules/Panels/Settings/Tabs/ControlCenter/ControlCenterTab.qml @@ -120,7 +120,7 @@ ColumnLayout { checked: subTabBar.currentIndex === 1 } NTabButton { - text: I18n.tr("settings.control-center.tabs.control-widgets") + text: I18n.tr("settings.control-center.tabs.shortcuts") tabIndex: 2 checked: subTabBar.currentIndex === 2 } @@ -144,7 +144,7 @@ ColumnLayout { cardsDefault: root.cardsDefault } - ControlWidgetsSubTab { + ShortcutsSubTab { availableWidgets: availableWidgets onAddWidgetToSection: (widgetId, section) => _addWidgetToSection(widgetId, section) onRemoveWidgetFromSection: (section, index) => _removeWidgetFromSection(section, index) diff --git a/Modules/Panels/Settings/Tabs/ControlCenter/ControlWidgetsSubTab.qml b/Modules/Panels/Settings/Tabs/ControlCenter/ShortcutsSubTab.qml similarity index 95% rename from Modules/Panels/Settings/Tabs/ControlCenter/ControlWidgetsSubTab.qml rename to Modules/Panels/Settings/Tabs/ControlCenter/ShortcutsSubTab.qml index ec544c68a..07ff18055 100644 --- a/Modules/Panels/Settings/Tabs/ControlCenter/ControlWidgetsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ControlCenter/ShortcutsSubTab.qml @@ -27,11 +27,6 @@ ColumnLayout { spacing: Style.marginXXS Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.control-center.shortcuts.section.label") - description: I18n.tr("settings.control-center.shortcuts.section.description") - } - // Sections ColumnLayout { Layout.fillWidth: true diff --git a/Modules/Panels/Settings/Tabs/DesktopWidgetsTab.qml b/Modules/Panels/Settings/Tabs/DesktopWidgetsTab.qml index a29f69f21..85b9367e4 100644 --- a/Modules/Panels/Settings/Tabs/DesktopWidgetsTab.qml +++ b/Modules/Panels/Settings/Tabs/DesktopWidgetsTab.qml @@ -27,11 +27,6 @@ ColumnLayout { } } - NHeader { - label: I18n.tr("settings.desktop-widgets.general.section.label") - description: I18n.tr("settings.desktop-widgets.general.section.description") - } - NToggle { Layout.fillWidth: true label: I18n.tr("settings.desktop-widgets.enabled.label") diff --git a/Modules/Panels/Settings/Tabs/Dock/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Dock/AppearanceSubTab.qml index 6cac76721..39c4b2abf 100644 --- a/Modules/Panels/Settings/Tabs/Dock/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Dock/AppearanceSubTab.qml @@ -9,11 +9,6 @@ ColumnLayout { spacing: Style.marginL Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.dock.appearance.section.label") - description: I18n.tr("settings.dock.appearance.section.description") - } - NToggle { Layout.fillWidth: true label: I18n.tr("settings.dock.enabled.label") @@ -24,146 +19,142 @@ ColumnLayout { onToggled: checked => Settings.data.dock.enabled = checked } - NComboBox { + ColumnLayout { + spacing: Style.marginL visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.display.label") - description: I18n.tr("settings.dock.appearance.display.description") - model: [ - { - "key": "always_visible", - "name": I18n.tr("settings.dock.appearance.display.always-visible") - }, - { - "key": "auto_hide", - "name": I18n.tr("settings.dock.appearance.display.auto-hide") - }, - { - "key": "exclusive", - "name": I18n.tr("settings.dock.appearance.display.exclusive") - } - ] - currentKey: Settings.data.dock.displayMode - isSettings: true - defaultValue: Settings.getDefaultValue("dock.displayMode") - onSelected: key => { - Settings.data.dock.displayMode = key; - } - } - NValueSlider { - visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.background-opacity.label") - description: I18n.tr("settings.dock.appearance.background-opacity.description") - from: 0 - to: 1 - stepSize: 0.01 - value: Settings.data.dock.backgroundOpacity - isSettings: true - defaultValue: Settings.getDefaultValue("dock.backgroundOpacity") - onMoved: value => Settings.data.dock.backgroundOpacity = value - text: Math.floor(Settings.data.dock.backgroundOpacity * 100) + "%" - } + NComboBox { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.display.label") + description: I18n.tr("settings.dock.appearance.display.description") + model: [ + { + "key": "always_visible", + "name": I18n.tr("settings.dock.appearance.display.always-visible") + }, + { + "key": "auto_hide", + "name": I18n.tr("settings.dock.appearance.display.auto-hide") + }, + { + "key": "exclusive", + "name": I18n.tr("settings.dock.appearance.display.exclusive") + } + ] + currentKey: Settings.data.dock.displayMode + isSettings: true + defaultValue: Settings.getDefaultValue("dock.displayMode") + onSelected: key => { + Settings.data.dock.displayMode = key; + } + } - NValueSlider { - visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.dead-opacity.label") - description: I18n.tr("settings.dock.appearance.dead-opacity.description") - from: 0 - to: 1 - stepSize: 0.01 - value: Settings.data.dock.deadOpacity - isSettings: true - defaultValue: Settings.getDefaultValue("dock.deadOpacity") - onMoved: value => Settings.data.dock.deadOpacity = value - text: Math.floor(Settings.data.dock.deadOpacity * 100) + "%" - } + NValueSlider { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.background-opacity.label") + description: I18n.tr("settings.dock.appearance.background-opacity.description") + from: 0 + to: 1 + stepSize: 0.01 + value: Settings.data.dock.backgroundOpacity + isSettings: true + defaultValue: Settings.getDefaultValue("dock.backgroundOpacity") + onMoved: value => Settings.data.dock.backgroundOpacity = value + text: Math.floor(Settings.data.dock.backgroundOpacity * 100) + "%" + } - NValueSlider { - visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.floating-distance.label") - description: I18n.tr("settings.dock.appearance.floating-distance.description") - from: 0 - to: 4 - stepSize: 0.01 - value: Settings.data.dock.floatingRatio - isSettings: true - defaultValue: Settings.getDefaultValue("dock.floatingRatio") - onMoved: value => Settings.data.dock.floatingRatio = value - text: Math.floor(Settings.data.dock.floatingRatio * 100) + "%" - } + NValueSlider { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.dead-opacity.label") + description: I18n.tr("settings.dock.appearance.dead-opacity.description") + from: 0 + to: 1 + stepSize: 0.01 + value: Settings.data.dock.deadOpacity + isSettings: true + defaultValue: Settings.getDefaultValue("dock.deadOpacity") + onMoved: value => Settings.data.dock.deadOpacity = value + text: Math.floor(Settings.data.dock.deadOpacity * 100) + "%" + } - NValueSlider { - visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.icon-size.label") - description: I18n.tr("settings.dock.appearance.icon-size.description") - from: 0 - to: 2 - stepSize: 0.01 - value: Settings.data.dock.size - isSettings: true - defaultValue: Settings.getDefaultValue("dock.size") - onMoved: value => Settings.data.dock.size = value - text: Math.floor(Settings.data.dock.size * 100) + "%" - } + NValueSlider { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.floating-distance.label") + description: I18n.tr("settings.dock.appearance.floating-distance.description") + from: 0 + to: 4 + stepSize: 0.01 + value: Settings.data.dock.floatingRatio + isSettings: true + defaultValue: Settings.getDefaultValue("dock.floatingRatio") + onMoved: value => Settings.data.dock.floatingRatio = value + text: Math.floor(Settings.data.dock.floatingRatio * 100) + "%" + } - NValueSlider { - visible: Settings.data.dock.enabled && Settings.data.dock.displayMode === "auto_hide" - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.hide-show-speed.label") - description: I18n.tr("settings.dock.appearance.hide-show-speed.description") - from: 0.1 - to: 2.0 - stepSize: 0.01 - value: Settings.data.dock.animationSpeed - isSettings: true - defaultValue: Settings.getDefaultValue("dock.animationSpeed") - onMoved: value => Settings.data.dock.animationSpeed = value - text: (Settings.data.dock.animationSpeed * 100).toFixed(0) + "%" - } + NValueSlider { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.icon-size.label") + description: I18n.tr("settings.dock.appearance.icon-size.description") + from: 0 + to: 2 + stepSize: 0.01 + value: Settings.data.dock.size + isSettings: true + defaultValue: Settings.getDefaultValue("dock.size") + onMoved: value => Settings.data.dock.size = value + text: Math.floor(Settings.data.dock.size * 100) + "%" + } - NToggle { - visible: Settings.data.dock.enabled - label: I18n.tr("settings.dock.appearance.inactive-indicators.label") - description: I18n.tr("settings.dock.appearance.inactive-indicators.description") - checked: Settings.data.dock.inactiveIndicators - isSettings: true - defaultValue: Settings.getDefaultValue("dock.inactiveIndicators") - onToggled: checked => Settings.data.dock.inactiveIndicators = checked - } + NValueSlider { + visible: Settings.data.dock.displayMode === "auto_hide" + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.hide-show-speed.label") + description: I18n.tr("settings.dock.appearance.hide-show-speed.description") + from: 0.1 + to: 2.0 + stepSize: 0.01 + value: Settings.data.dock.animationSpeed + isSettings: true + defaultValue: Settings.getDefaultValue("dock.animationSpeed") + onMoved: value => Settings.data.dock.animationSpeed = value + text: (Settings.data.dock.animationSpeed * 100).toFixed(0) + "%" + } - NToggle { - visible: Settings.data.dock.enabled - label: I18n.tr("settings.dock.appearance.pinned-static.label") - description: I18n.tr("settings.dock.appearance.pinned-static.description") - checked: Settings.data.dock.pinnedStatic - isSettings: true - defaultValue: Settings.getDefaultValue("dock.pinnedStatic") - onToggled: checked => Settings.data.dock.pinnedStatic = checked - } + NToggle { + label: I18n.tr("settings.dock.appearance.inactive-indicators.label") + description: I18n.tr("settings.dock.appearance.inactive-indicators.description") + checked: Settings.data.dock.inactiveIndicators + isSettings: true + defaultValue: Settings.getDefaultValue("dock.inactiveIndicators") + onToggled: checked => Settings.data.dock.inactiveIndicators = checked + } - NToggle { - visible: Settings.data.dock.enabled - label: I18n.tr("settings.dock.monitors.only-same-monitor.label") - description: I18n.tr("settings.dock.monitors.only-same-monitor.description") - checked: Settings.data.dock.onlySameOutput - isSettings: true - defaultValue: Settings.getDefaultValue("dock.onlySameOutput") - onToggled: checked => Settings.data.dock.onlySameOutput = checked - } + NToggle { + label: I18n.tr("settings.dock.appearance.pinned-static.label") + description: I18n.tr("settings.dock.appearance.pinned-static.description") + checked: Settings.data.dock.pinnedStatic + isSettings: true + defaultValue: Settings.getDefaultValue("dock.pinnedStatic") + onToggled: checked => Settings.data.dock.pinnedStatic = checked + } - NToggle { - visible: Settings.data.dock.enabled - Layout.fillWidth: true - label: I18n.tr("settings.dock.appearance.colorize-icons.label") - description: I18n.tr("settings.dock.appearance.colorize-icons.description") - checked: Settings.data.dock.colorizeIcons - isSettings: true - defaultValue: Settings.getDefaultValue("dock.colorizeIcons") - onToggled: checked => Settings.data.dock.colorizeIcons = checked + NToggle { + label: I18n.tr("settings.dock.monitors.only-same-monitor.label") + description: I18n.tr("settings.dock.monitors.only-same-monitor.description") + checked: Settings.data.dock.onlySameOutput + isSettings: true + defaultValue: Settings.getDefaultValue("dock.onlySameOutput") + onToggled: checked => Settings.data.dock.onlySameOutput = checked + } + + NToggle { + Layout.fillWidth: true + label: I18n.tr("settings.dock.appearance.colorize-icons.label") + description: I18n.tr("settings.dock.appearance.colorize-icons.description") + checked: Settings.data.dock.colorizeIcons + isSettings: true + defaultValue: Settings.getDefaultValue("dock.colorizeIcons") + onToggled: checked => Settings.data.dock.colorizeIcons = checked + } } } diff --git a/Modules/Panels/Settings/Tabs/Dock/DockTab.qml b/Modules/Panels/Settings/Tabs/Dock/DockTab.qml index 6cf132b13..62532b16a 100644 --- a/Modules/Panels/Settings/Tabs/Dock/DockTab.qml +++ b/Modules/Panels/Settings/Tabs/Dock/DockTab.qml @@ -8,19 +8,6 @@ ColumnLayout { id: root spacing: 0 - // Helper functions to update arrays immutably - function addMonitor(list, name) { - const arr = (list || []).slice(); - if (!arr.includes(name)) - arr.push(name); - return arr; - } - function removeMonitor(list, name) { - return (list || []).filter(function (n) { - return n !== name; - }); - } - NTabBar { id: subTabBar Layout.fillWidth: true @@ -36,6 +23,7 @@ ColumnLayout { text: I18n.tr("settings.dock.tabs.monitors") tabIndex: 1 checked: subTabBar.currentIndex === 1 + visible: Settings.data.dock.enabled } } @@ -49,9 +37,6 @@ ColumnLayout { currentIndex: subTabBar.currentIndex AppearanceSubTab {} - MonitorsSubTab { - addMonitor: root.addMonitor - removeMonitor: root.removeMonitor - } + MonitorsSubTab {} } } diff --git a/Modules/Panels/Settings/Tabs/Dock/MonitorsSubTab.qml b/Modules/Panels/Settings/Tabs/Dock/MonitorsSubTab.qml index a322a21ee..8d463f76d 100644 --- a/Modules/Panels/Settings/Tabs/Dock/MonitorsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Dock/MonitorsSubTab.qml @@ -11,12 +11,17 @@ ColumnLayout { spacing: Style.marginL Layout.fillWidth: true - property var addMonitor - property var removeMonitor - - NHeader { - label: I18n.tr("settings.dock.monitors.section.label") - description: I18n.tr("settings.dock.monitors.section.description") + // Helper functions to update arrays immutably + function addMonitor(list, name) { + const arr = (list || []).slice(); + if (!arr.includes(name)) + arr.push(name); + return arr; + } + function removeMonitor(list, name) { + return (list || []).filter(function (n) { + return n !== name; + }); } Repeater { @@ -36,11 +41,15 @@ ColumnLayout { checked: (Settings.data.dock.monitors || []).indexOf(modelData.name) !== -1 onToggled: checked => { if (checked) { - Settings.data.dock.monitors = addMonitor(Settings.data.dock.monitors, modelData.name); + Settings.data.dock.monitors = root.addMonitor(Settings.data.dock.monitors, modelData.name); } else { - Settings.data.dock.monitors = removeMonitor(Settings.data.dock.monitors, modelData.name); + Settings.data.dock.monitors = root.removeMonitor(Settings.data.dock.monitors, modelData.name); } } } } + + NLabel { + description: I18n.tr("settings.dock.monitors.section.description") + } } diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/AutomationSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/AutomationSubTab.qml index 93d607bba..4388082ad 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/AutomationSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/AutomationSubTab.qml @@ -10,10 +10,6 @@ ColumnLayout { spacing: Style.marginL Layout.fillWidth: true - NHeader { - label: I18n.tr("settings.wallpaper.automation.section.label") - } - NToggle { label: I18n.tr("settings.wallpaper.automation.scheduled-change.label") description: I18n.tr("settings.wallpaper.automation.scheduled-change.description") diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/SettingsSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml similarity index 97% rename from Modules/Panels/Settings/Tabs/Wallpaper/SettingsSubTab.qml rename to Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml index 90b1f1f9a..ead01d4a2 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/SettingsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml @@ -17,11 +17,6 @@ ColumnLayout { signal openMainFolderPicker signal openMonitorFolderPicker(string monitorName) - NHeader { - label: I18n.tr("settings.wallpaper.settings.section.label") - description: I18n.tr("settings.wallpaper.settings.section.description") - } - NToggle { label: I18n.tr("settings.wallpaper.settings.enable-management.label") description: I18n.tr("settings.wallpaper.settings.enable-management.description") diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml index bc1a3b12d..2b2475408 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/LookAndFeelSubTab.qml @@ -12,10 +12,6 @@ ColumnLayout { property var screen - NHeader { - label: I18n.tr("settings.wallpaper.look-feel.section.label") - } - NComboBox { label: I18n.tr("settings.wallpaper.look-feel.fill-mode.label") description: I18n.tr("settings.wallpaper.look-feel.fill-mode.description") diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/WallpaperTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/WallpaperTab.qml index 94b15d0a2..7b10128ea 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/WallpaperTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/WallpaperTab.qml @@ -30,7 +30,7 @@ ColumnLayout { currentIndex: tabView.currentIndex NTabButton { - text: I18n.tr("settings.wallpaper.tabs.settings") + text: I18n.tr("settings.wallpaper.tabs.general") tabIndex: 0 checked: subTabBar.currentIndex === 0 } @@ -38,11 +38,13 @@ ColumnLayout { text: I18n.tr("settings.wallpaper.tabs.look-feel") tabIndex: 1 checked: subTabBar.currentIndex === 1 + visible: Settings.data.wallpaper.enabled } NTabButton { text: I18n.tr("settings.wallpaper.tabs.automation") tabIndex: 2 checked: subTabBar.currentIndex === 2 + visible: Settings.data.wallpaper.enabled } } @@ -55,7 +57,7 @@ ColumnLayout { id: tabView currentIndex: subTabBar.currentIndex - SettingsSubTab { + GeneralSubTab { screen: root.screen onOpenMainFolderPicker: root.openMainFolderPicker() onOpenMonitorFolderPicker: monitorName => root.openMonitorFolderPicker(monitorName) diff --git a/Services/Power/PowerProfileService.qml b/Services/Power/PowerProfileService.qml index c13432086..5fed8f227 100644 --- a/Services/Power/PowerProfileService.qml +++ b/Services/Power/PowerProfileService.qml @@ -103,7 +103,9 @@ Singleton { // Only show toast if we have a valid profile name (not "Unknown") const profileName = root.getName(); if (profileName !== "Unknown") { - ToastService.showNotice(I18n.tr("toast.power-profile.profile-name", {"profile": profileName}), I18n.tr("toast.power-profile.changed"), profileName.toLowerCase().replace(" ", "")); + ToastService.showNotice(I18n.tr("toast.power-profile.profile-name", { + "profile": profileName + }), I18n.tr("toast.power-profile.changed"), profileName.toLowerCase().replace(" ", "")); } } } diff --git a/Services/System/ProgramCheckerService.qml b/Services/System/ProgramCheckerService.qml index 803d69c4b..ba8ed3bcc 100644 --- a/Services/System/ProgramCheckerService.qml +++ b/Services/System/ProgramCheckerService.qml @@ -17,6 +17,7 @@ Singleton { property bool wlsunsetAvailable: false property bool app2unitAvailable: false property bool gnomeCalendarAvailable: false + property bool wtypeAvailable: false // Programs to check - maps property names to commands readonly property var programsToCheck: ({ @@ -25,7 +26,8 @@ Singleton { "nmcliAvailable": ["sh", "-c", "command -v nmcli"], "wlsunsetAvailable": ["sh", "-c", "command -v wlsunset"], "app2unitAvailable": ["sh", "-c", "command -v app2unit"], - "gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"] + "gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"], + "wtypeAvailable": ["sh", "-c", "command -v wtype"] }) // Discord client auto-detection