QuickSettings: customization!?

This commit is contained in:
lysec
2025-10-09 13:56:35 +02:00
parent a90bca23aa
commit f77efc409b
15 changed files with 507 additions and 33 deletions
+15 -3
View File
@@ -4,16 +4,27 @@ import qs.Commons
import qs.Services
import qs.Widgets
NButton {
NQuickSetting {
property ShellScreen screen
property real scaling: 1.0
outlined: true
enabled: ProgramCheckerService.wlsunsetAvailable
text: "Night Light"
fontSize: Style.fontSizeS * scaling
fontWeight: Style.fontWeightRegular
fontWeight: Style.fontWeightMedium
icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off"
active: Settings.data.nightLight.enabled
style: Settings.data.controlCenter.quickSettingsStyle || "modern"
tooltipText: {
if (!Settings.data.nightLight.enabled) {
return "Turn on Night Light"
} else if (Settings.data.nightLight.forced) {
return "Night Light forced on"
} else {
return "Turn off Night Light"
}
}
onClicked: {
if (!Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = true
@@ -25,6 +36,7 @@ NButton {
Settings.data.nightLight.forced = false
}
}
onRightClicked: {
var settingsPanel = PanelService.getPanel("settingsPanel")
settingsPanel.requestedTab = SettingsPanel.Tab.Display