File: 1001b_qml-Shell.qml-Dynamically-switch-gsettings-context-f.patch

package info (click to toggle)
lomiri 0.5.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,088 kB
  • sloc: cpp: 39,498; python: 2,559; javascript: 1,426; ansic: 1,012; sh: 289; xml: 252; makefile: 69
file content (50 lines) | stat: -rw-r--r-- 2,091 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From acc25222be03f335de2841bf8dd35a86e46ee667 Mon Sep 17 00:00:00 2001
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Date: Thu, 31 Jul 2025 22:28:11 +0200
Subject: [PATCH] qml/Shell.qml: Dynamically switch gsettings context for
 backgroundPictureUri retrieval between com.lomiri.Shell and
 com.lomiri.Shell.Greeter.

This assures that bg image switching between session and lock screen
works as expected.

Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 qml/Shell.qml | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/qml/Shell.qml b/qml/Shell.qml
index 1b1ac54b3..55329be65 100644
--- a/qml/Shell.qml
+++ b/qml/Shell.qml
@@ -190,15 +190,24 @@ StyledItem {
 
         readonly property url defaultBackground: "file://" + Constants.defaultWallpaper
         readonly property bool hasCustomBackground: resolvedImage != defaultBackground
+        readonly property string gsettingsBackgroundPictureUri: ((shell.showingGreeter == true)
+                                                             ||  (shell.mode === "full-greeter")
+                                                             ||  (shell.mode === "greeter"))
+                                                              ? backgroundGreeterSettings.backgroundPictureUri
+                                                              : backgroundShellSettings.backgroundPictureUri
 
         GSettings {
-            id: backgroundSettings
-            schema.id: ((shell.showingGreeter == true) || (shell.mode === "full-greeter") || (shell.mode === "greeter")) ? "com.lomiri.Shell.Greeter" : "com.lomiri.Shell"
+            id: backgroundShellSettings
+            schema.id: "com.lomiri.Shell"
+        }
+        GSettings {
+            id: backgroundGreeterSettings
+            schema.id: "com.lomiri.Shell.Greeter"
         }
 
         candidates: [
             AccountsService.backgroundFile,
-            backgroundSettings.backgroundPictureUri,
+            gsettingsBackgroundPictureUri,
             defaultBackground
         ]
     }
-- 
2.47.2