From 8da6f0d6f1d5722c6a612520c83c0c2caeaef541 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 16 May 2025 15:19:32 +0000 Subject: [PATCH] [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 Gbp-Pq: Name upstream_6d12cde3_wallpapers-image-Fix-thumbnails-not-matching-output-size.patch --- 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 ba711887..82464448 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 -- 2.30.2