mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
QuickSettings: customization!?
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user