commit:     f978945a3ed1c5f29ea627e1fe8b6144438f1c9c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 10 12:19:11 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 12:22:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f978945a

kde-plasma/plasma-desktop: FolderView: Fix grid overflow property

...so it properly reports overflow state.

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=419878
Upstream commit cb3cbbe3b07da0c9e35cdef69343d32f7659f550

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...5.5-folderview-fix-grid-overflow-property.patch | 40 ++++++++++++++++++++++
 .../plasma-desktop/plasma-desktop-5.25.5-r1.ebuild |  3 +-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git 
a/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-folderview-fix-grid-overflow-property.patch
 
b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-folderview-fix-grid-overflow-property.patch
new file mode 100644
index 000000000000..40d34cad1bf1
--- /dev/null
+++ 
b/kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-folderview-fix-grid-overflow-property.patch
@@ -0,0 +1,40 @@
+From cb3cbbe3b07da0c9e35cdef69343d32f7659f550 Mon Sep 17 00:00:00 2001
+From: Arjen Hiemstra <[email protected]>
+Date: Thu, 15 Sep 2022 17:08:00 +0200
+Subject: [PATCH] folderview: Fix grid overflow property so it properly reports
+ overflow state
+
+In some cases, viewportArea.widthRatio or heightRatio can be 0 when it's
+not actually overflowing. So account for that to ensure we properly
+report the overflow state.
+
+BUG: 419878
+
+
+(cherry picked from commit 754e229b83708c1b8c7be547ef2dcf5645bafc21)
+---
+ containments/desktop/package/contents/ui/FolderView.qml | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/containments/desktop/package/contents/ui/FolderView.qml 
b/containments/desktop/package/contents/ui/FolderView.qml
+index 72ae4903a..a057a5099 100644
+--- a/containments/desktop/package/contents/ui/FolderView.qml
++++ b/containments/desktop/package/contents/ui/FolderView.qml
+@@ -657,7 +657,13 @@ FocusScope {
+                 property bool ctrlPressed: false
+                 property bool shiftPressed: false
+ 
+-                property bool overflowing: (visibleArea.heightRatio < 1.0 || 
visibleArea.widthRatio < 1.0)
++                property bool overflowing: {
++                    // widthRatio or heightRatio may be 0 when it's not 
actually
++                    // overflowing, so account for that.
++                    let widthOverflow =  visibleArea.widthRatio > 0.0 && 
visibleArea.widthRatio < 1.0
++                    let heightOverflow = visibleArea.heightRatio > 0.0 && 
visibleArea.heightRatio < 1.0
++                    return widthOverflow || heightOverflow
++                }
+ 
+                 property bool scrollLeft: false
+                 property bool scrollRight: false
+-- 
+GitLab
+

diff --git a/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r1.ebuild 
b/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r1.ebuild
index aec973dc613f..f4eba60391c6 100644
--- a/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r1.ebuild
+++ b/kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r1.ebuild
@@ -77,7 +77,7 @@ COMMON_DEPEND="
        x11-libs/libX11
        x11-libs/libXfixes
        x11-libs/libXi
-       x11-libs/libxcb[xkb]
+       x11-libs/libxcb
        x11-libs/libxkbfile
        emoji? (
                app-i18n/ibus[emoji]
@@ -121,6 +121,7 @@ BDEPEND="virtual/pkgconfig"
 PATCHES=(
        "${WORKDIR}/${XORGHDRS}/${PN}-5.24.6-override-include-dirs.patch" # 
downstream patch
        "${FILESDIR}/${P}-desktoptoolbox-fix-flickering-on-close.patch" # 
KDE-bug 417849
+       "${FILESDIR}/${P}-folderview-fix-grid-overflow-property.patch" # 
KDE-bug 419878
 )
 
 src_prepare() {

Reply via email to