You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-workspace/b8544fc070e88614feb9c198f6e...

48 lines
1.4 KiB

From b8544fc070e88614feb9c198f6ea910c91f3c5d5 Mon Sep 17 00:00:00 2001
From: Ismael Asensio <isma.af@gmail.com>
Date: Mon, 6 Nov 2023 19:13:37 +0000
Subject: [PATCH] kcms/nightcolor: Fix nightcolor with automatic location
As it turns out that the UI never send the geo-location to the
backend so backend always fallbacks to (0, 0) lat and lon
coordinates unless manually changed by `qdbus` commad..
BUG: 469730
FIXED-IN: 5.27.10
(cherry picked from commit cb2b0e9c036d844d87fd104a3ae031b59243eaa5)
---
kcms/nightcolor/package/contents/ui/main.qml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/kcms/nightcolor/package/contents/ui/main.qml b/kcms/nightcolor/package/contents/ui/main.qml
index c7d237f13b..418c05d42f 100644
--- a/kcms/nightcolor/package/contents/ui/main.qml
+++ b/kcms/nightcolor/package/contents/ui/main.qml
@@ -60,6 +60,21 @@ KCM.SimpleKCM {
}
}
+ // Update backend when locator is changed
+ Connections {
+ target: locator
+ function onLatitudeChanged() {
+ if (root.doneLocating) {
+ kcm.nightColorSettings.latitudeAuto = locator.latitude
+ }
+ }
+ function onLongitudeChanged() {
+ if (root.doneLocating) {
+ kcm.nightColorSettings.longitudeAuto = locator.latitude
+ }
+ }
+ }
+
header: ColumnLayout{
Kirigami.InlineMessage {
id: errorMessage
--
GitLab