mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
hide brightness slider opt
This commit is contained in:
@@ -95,6 +95,7 @@ Singleton {
|
|||||||
property bool topBarSquareCorners: false
|
property bool topBarSquareCorners: false
|
||||||
property bool topBarNoBackground: false
|
property bool topBarNoBackground: false
|
||||||
property bool lockScreenShowPowerActions: true
|
property bool lockScreenShowPowerActions: true
|
||||||
|
property bool hideBrightnessSlider: false
|
||||||
property int notificationTimeoutLow: 5000
|
property int notificationTimeoutLow: 5000
|
||||||
property int notificationTimeoutNormal: 5000
|
property int notificationTimeoutNormal: 5000
|
||||||
property int notificationTimeoutCritical: 0
|
property int notificationTimeoutCritical: 0
|
||||||
@@ -259,6 +260,7 @@ Singleton {
|
|||||||
topBarSquareCorners = settings.topBarSquareCorners !== undefined ? settings.topBarSquareCorners : false
|
topBarSquareCorners = settings.topBarSquareCorners !== undefined ? settings.topBarSquareCorners : false
|
||||||
topBarNoBackground = settings.topBarNoBackground !== undefined ? settings.topBarNoBackground : false
|
topBarNoBackground = settings.topBarNoBackground !== undefined ? settings.topBarNoBackground : false
|
||||||
lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true
|
lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true
|
||||||
|
hideBrightnessSlider = settings.hideBrightnessSlider !== undefined ? settings.hideBrightnessSlider : false
|
||||||
screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({})
|
screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({})
|
||||||
applyStoredTheme()
|
applyStoredTheme()
|
||||||
detectAvailableIconThemes()
|
detectAvailableIconThemes()
|
||||||
@@ -350,6 +352,7 @@ Singleton {
|
|||||||
"topBarSquareCorners": topBarSquareCorners,
|
"topBarSquareCorners": topBarSquareCorners,
|
||||||
"topBarNoBackground": topBarNoBackground,
|
"topBarNoBackground": topBarNoBackground,
|
||||||
"lockScreenShowPowerActions": lockScreenShowPowerActions,
|
"lockScreenShowPowerActions": lockScreenShowPowerActions,
|
||||||
|
"hideBrightnessSlider": hideBrightnessSlider,
|
||||||
"notificationTimeoutLow": notificationTimeoutLow,
|
"notificationTimeoutLow": notificationTimeoutLow,
|
||||||
"notificationTimeoutNormal": notificationTimeoutNormal,
|
"notificationTimeoutNormal": notificationTimeoutNormal,
|
||||||
"notificationTimeoutCritical": notificationTimeoutCritical,
|
"notificationTimeoutCritical": notificationTimeoutCritical,
|
||||||
@@ -920,6 +923,11 @@ Singleton {
|
|||||||
saveSettings()
|
saveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setHideBrightnessSlider(enabled) {
|
||||||
|
hideBrightnessSlider = enabled
|
||||||
|
saveSettings()
|
||||||
|
}
|
||||||
|
|
||||||
function setScreenPreferences(prefs) {
|
function setScreenPreferences(prefs) {
|
||||||
screenPreferences = prefs
|
screenPreferences = prefs
|
||||||
saveSettings()
|
saveSettings()
|
||||||
|
|||||||
@@ -527,12 +527,13 @@ DankPopout {
|
|||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
AudioSliderRow {
|
AudioSliderRow {
|
||||||
width: (parent.width - Theme.spacingM) / 2
|
width: SettingsData.hideBrightnessSlider ? parent.width - Theme.spacingM : (parent.width - Theme.spacingM) / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: (parent.width - Theme.spacingM) / 2
|
width: (parent.width - Theme.spacingM) / 2
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
visible: !SettingsData.hideBrightnessSlider
|
||||||
|
|
||||||
BrightnessSliderRow {
|
BrightnessSliderRow {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|||||||
@@ -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 {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 1
|
height: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user