summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-24 01:37:53 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-24 01:37:53 +1000
commit2ccd3a8662c46e1be9cfb21a8d60751c98e78065 (patch)
treeda9c846b547c32b5bd6a8a0df46fc6eb6a862d91 /services
parentplayers: persist active player across reloads (diff)
downloadcaelestia-shell-2ccd3a8662c46e1be9cfb21a8d60751c98e78065.tar.gz
caelestia-shell-2ccd3a8662c46e1be9cfb21a8d60751c98e78065.tar.bz2
caelestia-shell-2ccd3a8662c46e1be9cfb21a8d60751c98e78065.zip
plugin: add image analyser
Diffstat (limited to 'services')
-rw-r--r--services/Colours.qml14
1 files changed, 4 insertions, 10 deletions
diff --git a/services/Colours.qml b/services/Colours.qml
index 83ca2ae..cd86c8f 100644
--- a/services/Colours.qml
+++ b/services/Colours.qml
@@ -22,7 +22,7 @@ Singleton {
readonly property M3Palette current: M3Palette {}
readonly property M3Palette preview: M3Palette {}
readonly property Transparency transparency: Transparency {}
- property real wallLuminance
+ readonly property alias wallLuminance: analyser.luminance
function getLuminance(c: color): real {
if (c.r == 0 && c.g == 0 && c.b == 0)
@@ -85,16 +85,10 @@ Singleton {
onLoaded: root.load(text(), false)
}
- Connections {
- target: Wallpapers
+ ImageAnalyser {
+ id: analyser
- function onCurrentChanged(): void {
- const current = Wallpapers.current;
- CUtils.getAverageLuminance(current, l => {
- if (Wallpapers.current == current)
- root.wallLuminance = l;
- });
- }
+ source: Wallpapers.current
}
component Transparency: QtObject {