summaryrefslogtreecommitdiff
path: root/kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch')
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch
new file mode 100644
index 000000000000..17286608fc8d
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.27.9-fix-nightcolor-autolocation.patch
@@ -0,0 +1,47 @@
+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
+