Autoformat
This commit is contained in:
parent
e237bd04ff
commit
d0b7ccf302
6 changed files with 81 additions and 43 deletions
|
|
@ -19,7 +19,6 @@ Item {
|
||||||
implicitWidth: pill.width
|
implicitWidth: pill.width
|
||||||
implicitHeight: pill.height
|
implicitHeight: pill.height
|
||||||
|
|
||||||
|
|
||||||
function getIcon() {
|
function getIcon() {
|
||||||
if (AudioService.muted) {
|
if (AudioService.muted) {
|
||||||
return "volume_off"
|
return "volume_off"
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,6 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NCheckbox {
|
NCheckbox {
|
||||||
label: "GTK 4 (libadwaita)"
|
label: "GTK 4 (libadwaita)"
|
||||||
description: "Write ~/.config/gtk-4.0/gtk.css"
|
description: "Write ~/.config/gtk-4.0/gtk.css"
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,10 @@ ColumnLayout {
|
||||||
model: timeOptions
|
model: timeOptions
|
||||||
currentKey: Settings.data.nightLight.startTime
|
currentKey: Settings.data.nightLight.startTime
|
||||||
placeholder: "Select start time"
|
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
|
preferredWidth: 120 * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,7 +376,10 @@ ColumnLayout {
|
||||||
model: timeOptions
|
model: timeOptions
|
||||||
currentKey: Settings.data.nightLight.stopTime
|
currentKey: Settings.data.nightLight.stopTime
|
||||||
placeholder: "Select stop time"
|
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
|
preferredWidth: 120 * scaling
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ Singleton {
|
||||||
var lowTemp = Math.round(hiCfg - (hiCfg - loCfg) * Math.pow(i, 0.6))
|
var lowTemp = Math.round(hiCfg - (hiCfg - loCfg) * Math.pow(i, 0.6))
|
||||||
cmd.push("-t", lowTemp.toString())
|
cmd.push("-t", lowTemp.toString())
|
||||||
cmd.push("-T", hiCfg.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.stableLatitude)
|
||||||
cmd.push("-L", LocationService.data.stableLongitude)
|
cmd.push("-L", LocationService.data.stableLongitude)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -66,25 +67,47 @@ Singleton {
|
||||||
// Observe setting changes and location readiness
|
// Observe setting changes and location readiness
|
||||||
Connections {
|
Connections {
|
||||||
target: Settings.data.nightLight
|
target: Settings.data.nightLight
|
||||||
function onEnabledChanged() { apply() }
|
function onEnabledChanged() {
|
||||||
function onIntensityChanged() { apply() }
|
apply()
|
||||||
function onAutoScheduleChanged() { apply() }
|
}
|
||||||
function onStartTimeChanged() { apply() }
|
function onIntensityChanged() {
|
||||||
function onStopTimeChanged() { apply() }
|
apply()
|
||||||
|
}
|
||||||
|
function onAutoScheduleChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStartTimeChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStopTimeChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: LocationService.data
|
target: LocationService.data
|
||||||
function onCoordinatesReadyChanged() { if (params.enabled && params.autoSchedule) apply() }
|
function onCoordinatesReadyChanged() {
|
||||||
function onStableLatitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
|
if (params.enabled && params.autoSchedule)
|
||||||
function onStableLongitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
|
apply()
|
||||||
|
}
|
||||||
|
function onStableLatitudeChanged() {
|
||||||
|
if (params.enabled && params.autoSchedule)
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStableLongitudeChanged() {
|
||||||
|
if (params.enabled && params.autoSchedule)
|
||||||
|
apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foreground process runner
|
// Foreground process runner
|
||||||
Process {
|
Process {
|
||||||
id: runner
|
id: runner
|
||||||
running: false
|
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) {
|
onExited: function (code, status) {
|
||||||
isRunning = false
|
isRunning = false
|
||||||
Logger.log("NightLight", "wlsunset exited:", code, status)
|
Logger.log("NightLight", "wlsunset exited:", code, status)
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,26 @@ RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: { hovering = true; root.entered() }
|
onEntered: {
|
||||||
onExited: { hovering = false; root.exited() }
|
hovering = true
|
||||||
|
root.entered()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
hovering = false
|
||||||
|
root.exited()
|
||||||
|
}
|
||||||
onClicked: root.toggled(!root.checked)
|
onClicked: root.toggled(!root.checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: Style.animationFast } }
|
Behavior on color {
|
||||||
Behavior on border.color { ColorAnimation { duration: Style.animationFast } }
|
ColorAnimation {
|
||||||
|
duration: Style.animationFast
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Behavior on border.color {
|
||||||
|
ColorAnimation {
|
||||||
|
duration: Style.animationFast
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ ShellRoot {
|
||||||
ToastOverlay {}
|
ToastOverlay {}
|
||||||
|
|
||||||
// Night light handled by wlsunset via NightLightService; no overlay needed
|
// Night light handled by wlsunset via NightLightService; no overlay needed
|
||||||
|
|
||||||
IPCManager {}
|
IPCManager {}
|
||||||
|
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue