From 072cbf284ed6cafaaf8580baa6c95ca37e10c004 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sat, 6 Sep 2025 10:12:39 -0400 Subject: [PATCH] hide brightness slider opt --- Common/SettingsData.qml | 8 ++++++++ Modules/ControlCenter/ControlCenterPopout.qml | 3 ++- Modules/Settings/PersonalizationTab.qml | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Common/SettingsData.qml b/Common/SettingsData.qml index eaaffb99..30a4c85e 100644 --- a/Common/SettingsData.qml +++ b/Common/SettingsData.qml @@ -95,6 +95,7 @@ Singleton { property bool topBarSquareCorners: false property bool topBarNoBackground: false property bool lockScreenShowPowerActions: true + property bool hideBrightnessSlider: false property int notificationTimeoutLow: 5000 property int notificationTimeoutNormal: 5000 property int notificationTimeoutCritical: 0 @@ -259,6 +260,7 @@ Singleton { topBarSquareCorners = settings.topBarSquareCorners !== undefined ? settings.topBarSquareCorners : false topBarNoBackground = settings.topBarNoBackground !== undefined ? settings.topBarNoBackground : false lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true + hideBrightnessSlider = settings.hideBrightnessSlider !== undefined ? settings.hideBrightnessSlider : false screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({}) applyStoredTheme() detectAvailableIconThemes() @@ -350,6 +352,7 @@ Singleton { "topBarSquareCorners": topBarSquareCorners, "topBarNoBackground": topBarNoBackground, "lockScreenShowPowerActions": lockScreenShowPowerActions, + "hideBrightnessSlider": hideBrightnessSlider, "notificationTimeoutLow": notificationTimeoutLow, "notificationTimeoutNormal": notificationTimeoutNormal, "notificationTimeoutCritical": notificationTimeoutCritical, @@ -920,6 +923,11 @@ Singleton { saveSettings() } + function setHideBrightnessSlider(enabled) { + hideBrightnessSlider = enabled + saveSettings() + } + function setScreenPreferences(prefs) { screenPreferences = prefs saveSettings() diff --git a/Modules/ControlCenter/ControlCenterPopout.qml b/Modules/ControlCenter/ControlCenterPopout.qml index 9dd4cda6..26d315bc 100644 --- a/Modules/ControlCenter/ControlCenterPopout.qml +++ b/Modules/ControlCenter/ControlCenterPopout.qml @@ -527,12 +527,13 @@ DankPopout { spacing: Theme.spacingM AudioSliderRow { - width: (parent.width - Theme.spacingM) / 2 + width: SettingsData.hideBrightnessSlider ? parent.width - Theme.spacingM : (parent.width - Theme.spacingM) / 2 } Item { width: (parent.width - Theme.spacingM) / 2 height: parent.height + visible: !SettingsData.hideBrightnessSlider BrightnessSliderRow { width: parent.width diff --git a/Modules/Settings/PersonalizationTab.qml b/Modules/Settings/PersonalizationTab.qml index 0eee95ad..e2059f16 100644 --- a/Modules/Settings/PersonalizationTab.qml +++ b/Modules/Settings/PersonalizationTab.qml @@ -771,6 +771,16 @@ Item { } } + DankToggle { + width: parent.width + text: "Hide Brightness Slider" + description: "Hide the brightness slider in Control Center and make audio slider full width" + checked: SettingsData.hideBrightnessSlider + onToggled: checked => { + SettingsData.setHideBrightnessSlider(checked) + } + } + Rectangle { width: parent.width height: 1