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
|
||||
implicitHeight: pill.height
|
||||
|
||||
|
||||
function getIcon() {
|
||||
if (AudioService.muted) {
|
||||
return "volume_off"
|
||||
|
|
|
|||
|
|
@ -344,25 +344,24 @@ ColumnLayout {
|
|||
visible: Settings.data.colorSchemes.useWallpaperColors
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginS * scaling
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginS * scaling
|
||||
Layout.fillWidth: true
|
||||
|
||||
NText {
|
||||
text: "Matugen Templates"
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mSecondary
|
||||
}
|
||||
|
||||
NText {
|
||||
text: "Select which external components Matugen should apply theming to."
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: Color.mOnSurfaceVariant
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
NText {
|
||||
text: "Matugen Templates"
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mSecondary
|
||||
}
|
||||
|
||||
NText {
|
||||
text: "Select which external components Matugen should apply theming to."
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: Color.mOnSurfaceVariant
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
NCheckbox {
|
||||
label: "GTK 4 (libadwaita)"
|
||||
|
|
|
|||
|
|
@ -240,9 +240,9 @@ ColumnLayout {
|
|||
description: "Apply a warm color filter to reduce blue light emission."
|
||||
checked: Settings.data.nightLight.enabled
|
||||
onToggled: checked => {
|
||||
Settings.data.nightLight.enabled = checked
|
||||
NightLightService.apply()
|
||||
}
|
||||
Settings.data.nightLight.enabled = checked
|
||||
NightLightService.apply()
|
||||
}
|
||||
}
|
||||
|
||||
// Intensity settings
|
||||
|
|
@ -327,9 +327,9 @@ ColumnLayout {
|
|||
description: "Automatically enable night light based on time schedule."
|
||||
checked: Settings.data.nightLight.autoSchedule
|
||||
onToggled: checked => {
|
||||
Settings.data.nightLight.autoSchedule = checked
|
||||
NightLightService.apply()
|
||||
}
|
||||
Settings.data.nightLight.autoSchedule = checked
|
||||
NightLightService.apply()
|
||||
}
|
||||
visible: Settings.data.nightLight.enabled
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
@ -44,7 +45,7 @@ Singleton {
|
|||
|
||||
function stopIfRunning() {
|
||||
// Best-effort stop; wlsunset runs as foreground, so pkill is simplest
|
||||
Quickshell.execDetached(["pkill", "-x", "wlsunset"])
|
||||
Quickshell.execDetached(["pkill", "-x", "wlsunset"])
|
||||
isRunning = false
|
||||
}
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ ShellRoot {
|
|||
ToastOverlay {}
|
||||
|
||||
// Night light handled by wlsunset via NightLightService; no overlay needed
|
||||
|
||||
IPCManager {}
|
||||
|
||||
// ------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue