Autoformat

This commit is contained in:
Ly-sec 2025-08-28 15:35:52 +02:00
parent e237bd04ff
commit d0b7ccf302
6 changed files with 81 additions and 43 deletions

View file

@ -19,7 +19,6 @@ Item {
implicitWidth: pill.width
implicitHeight: pill.height
function getIcon() {
if (AudioService.muted) {
return "volume_off"

View file

@ -363,7 +363,6 @@ ColumnLayout {
}
}
NCheckbox {
label: "GTK 4 (libadwaita)"
description: "Write ~/.config/gtk-4.0/gtk.css"

View file

@ -357,7 +357,10 @@ ColumnLayout {
model: timeOptions
currentKey: Settings.data.nightLight.startTime
placeholder: "Select start time"
onSelected: key => { Settings.data.nightLight.startTime = key; NightLightService.apply() }
onSelected: key => {
Settings.data.nightLight.startTime = key
NightLightService.apply()
}
preferredWidth: 120 * scaling
}
@ -373,7 +376,10 @@ ColumnLayout {
model: timeOptions
currentKey: Settings.data.nightLight.stopTime
placeholder: "Select stop time"
onSelected: key => { Settings.data.nightLight.stopTime = key; NightLightService.apply() }
onSelected: key => {
Settings.data.nightLight.stopTime = key
NightLightService.apply()
}
preferredWidth: 120 * scaling
}
}

View file

@ -28,7 +28,8 @@ Singleton {
var lowTemp = Math.round(hiCfg - (hiCfg - loCfg) * Math.pow(i, 0.6))
cmd.push("-t", lowTemp.toString())
cmd.push("-T", hiCfg.toString())
if (params.autoSchedule && LocationService.data.coordinatesReady && LocationService.data.stableLatitude !== "" && LocationService.data.stableLongitude !== "") {
if (params.autoSchedule && LocationService.data.coordinatesReady && LocationService.data.stableLatitude !== ""
&& LocationService.data.stableLongitude !== "") {
cmd.push("-l", LocationService.data.stableLatitude)
cmd.push("-L", LocationService.data.stableLongitude)
} else {
@ -66,25 +67,47 @@ Singleton {
// Observe setting changes and location readiness
Connections {
target: Settings.data.nightLight
function onEnabledChanged() { apply() }
function onIntensityChanged() { apply() }
function onAutoScheduleChanged() { apply() }
function onStartTimeChanged() { apply() }
function onStopTimeChanged() { apply() }
function onEnabledChanged() {
apply()
}
function onIntensityChanged() {
apply()
}
function onAutoScheduleChanged() {
apply()
}
function onStartTimeChanged() {
apply()
}
function onStopTimeChanged() {
apply()
}
}
Connections {
target: LocationService.data
function onCoordinatesReadyChanged() { if (params.enabled && params.autoSchedule) apply() }
function onStableLatitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
function onStableLongitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
function onCoordinatesReadyChanged() {
if (params.enabled && params.autoSchedule)
apply()
}
function onStableLatitudeChanged() {
if (params.enabled && params.autoSchedule)
apply()
}
function onStableLongitudeChanged() {
if (params.enabled && params.autoSchedule)
apply()
}
}
// Foreground process runner
Process {
id: runner
running: false
onStarted: { isRunning = true; Logger.log("NightLight", "Started wlsunset:", root.lastCommand) }
onStarted: {
isRunning = true
Logger.log("NightLight", "Started wlsunset:", root.lastCommand)
}
onExited: function (code, status) {
isRunning = false
Logger.log("NightLight", "wlsunset exited:", code, status)

View file

@ -47,14 +47,26 @@ RowLayout {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: { hovering = true; root.entered() }
onExited: { hovering = false; root.exited() }
onEntered: {
hovering = true
root.entered()
}
onExited: {
hovering = false
root.exited()
}
onClicked: root.toggled(!root.checked)
}
Behavior on color { ColorAnimation { duration: Style.animationFast } }
Behavior on border.color { ColorAnimation { duration: Style.animationFast } }
Behavior on color {
ColorAnimation {
duration: Style.animationFast
}
}
Behavior on border.color {
ColorAnimation {
duration: Style.animationFast
}
}
}
}

View file

@ -51,7 +51,6 @@ ShellRoot {
ToastOverlay {}
// Night light handled by wlsunset via NightLightService; no overlay needed
IPCManager {}
// ------------------------------