summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-10-10 14:19:11 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-10-10 14:22:55 +0200
commitf978945a3ed1c5f29ea627e1fe8b6144438f1c9c (patch)
treeae7ece34a5c3a0bdc38cdd23f231b166c383a22b
parentkde-plasma/plasma-desktop: Fix edit mode toolbar flicker when closed (diff)
downloadgentoo-f978945a3ed1c5f29ea627e1fe8b6144438f1c9c.tar.gz
gentoo-f978945a3ed1c5f29ea627e1fe8b6144438f1c9c.tar.bz2
gentoo-f978945a3ed1c5f29ea627e1fe8b6144438f1c9c.zip
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@gentoo.org>
-rw-r--r--kde-plasma/plasma-desktop/files/plasma-desktop-5.25.5-folderview-fix-grid-overflow-property.patch40
-rw-r--r--kde-plasma/plasma-desktop/plasma-desktop-5.25.5-r1.ebuild3
2 files changed, 42 insertions, 1 deletions
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 <ahiemstra@heimr.nl>
+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() {