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 51 52 53 54 55 56 57 58 59
|
From 6d12cde35dda92904536ee3045d5f9ed9e83248d Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Fri, 16 May 2025 15:19:32 +0000
Subject: [PATCH] wallpapers/image: Fix thumbnails not matching output size
The `Screen` is an attached property and it never changes, we need to
monitor screen size changes instead.
BUG: 483097
(cherry picked from commit d6436e077c05abd100d905aaa73222a48ca1695f)
7678dfa9 wallpapers/image: Fix thumbnails not matching output size
5f4d8bc8 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
---
wallpapers/image/imagepackage/contents/ui/config.qml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml
index 7b3120bacb..d818ad98ec 100644
--- a/wallpapers/image/imagepackage/contents/ui/config.qml
+++ b/wallpapers/image/imagepackage/contents/ui/config.qml
@@ -25,8 +25,7 @@ ColumnLayout {
property var configDialog
property var wallpaperConfiguration: wallpaper.configuration
property var parentLayout
- property var screen : Screen
- property var screenSize: !!screen.geometry ? Qt.size(screen.geometry.width, screen.geometry.height): Qt.size(screen.width, screen.height)
+ property var screenSize: Qt.size(Screen.width, Screen.height)
property alias cfg_Color: colorButton.color
property color cfg_ColorDefault
@@ -53,9 +52,9 @@ ColumnLayout {
*/
signal wallpaperBrowseCompleted();
- onScreenChanged: function() {
+ onScreenSizeChanged: function() {
if (thumbnailsLoader.item) {
- thumbnailsLoader.item.screenSize = !!root.screen.geometry ? Qt.size(root.screen.geometry.width, root.screen.geometry.height): Qt.size(root.screen.width, root.screen.height);
+ thumbnailsLoader.item.screenSize = root.screenSize;
}
}
@@ -77,7 +76,7 @@ ColumnLayout {
renderingMode: (configDialog.currentWallpaper === "org.kde.image") ? PlasmaWallpaper.ImageBackend.SingleImage : PlasmaWallpaper.ImageBackend.SlideShow
targetSize: {
// Lock screen configuration case
- return Qt.size(root.screenSize.width * root.screen.devicePixelRatio, root.screenSize.height * root.screen.devicePixelRatio)
+ return Qt.size(root.screenSize.width * Screen.devicePixelRatio, root.screenSize.height * Screen.devicePixelRatio)
}
onSlidePathsChanged: cfg_SlidePaths = slidePaths
onUncheckedSlidesChanged: cfg_UncheckedSlides = uncheckedSlides
--
GitLab
|