Backport of "AboutPage: Prevent infinite loop" (Fixes RHBZ#2057563)

https://invent.kde.org/frameworks/kirigami/-/merge_requests/521
epel9
František Zatloukal 3 years ago
parent c5bca1abf7
commit aeb8ce420f

@ -0,0 +1,49 @@
From 57187b7e6a1c6396c95b9450ff4c8acb8e70f431 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 5 Apr 2022 00:40:27 +0200
Subject: [PATCH] AboutPage: Prevent infinite loop
Do not use the width of the item but the width of the page to decide if
we are on wide mode in the FormLayout.
For some reason our default height hits a perfect storm of:
- growing past the page height
- adds a scrollbar
- this narrows the view and we enable the compact mode
- this makes it fit again
- goto 0
BUG: 447958
---
src/controls/AboutItem.qml | 2 ++
src/controls/AboutPage.qml | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/controls/AboutItem.qml b/src/controls/AboutItem.qml
index fbc720a1..675bab44 100644
--- a/src/controls/AboutItem.qml
+++ b/src/controls/AboutItem.qml
@@ -74,6 +74,8 @@ Item
/** @internal */
property bool _usePageStack: false
+ property alias wideMode: form.wideMode
+
/** @internal */
default property alias _content: form.data
diff --git a/src/controls/AboutPage.qml b/src/controls/AboutPage.qml
index e0043343..22994940 100644
--- a/src/controls/AboutPage.qml
+++ b/src/controls/AboutPage.qml
@@ -95,6 +95,7 @@ ScrollablePage
AboutItem {
id: aboutItem
+ wideMode: page.width >= aboutItem.implicitWidth
_usePageStack: applicationWindow().pageStack ? true : false
}
--
GitLab

@ -9,7 +9,7 @@
Name: kf5-%{framework} Name: kf5-%{framework}
Version: 5.93.0 Version: 5.93.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: QtQuick plugins to build user interfaces based on the KDE UX guidelines Summary: QtQuick plugins to build user interfaces based on the KDE UX guidelines
# All LGPLv2+ except for src/desktopicons.h (GPLv2+) # All LGPLv2+ except for src/desktopicons.h (GPLv2+)
@ -26,6 +26,9 @@ URL: https://techbase.kde.org/Kirigami
Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz
## upstream paches ## upstream paches
# Backport of "AboutPage: Prevent infinite loop" (Fixes RHBZ#2057563)
# https://invent.kde.org/frameworks/kirigami/-/merge_requests/521
Patch01: 521.patch
# filter qml provides # filter qml provides
%global __provides_exclude_from ^%{_kf5_qmldir}/.*\\.so$ %global __provides_exclude_from ^%{_kf5_qmldir}/.*\\.so$
@ -123,6 +126,9 @@ make test ARGS="--output-on-failure --timeout 30" -C %{_target_platform} ||:
%changelog %changelog
* Mon Apr 11 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 5.93-2
- Backport of "AboutPage: Prevent infinite loop" (Fixes RHBZ#2057563)
* Sun Apr 10 2022 Justin Zobel <justin@1707.io> - 5.93-1 * Sun Apr 10 2022 Justin Zobel <justin@1707.io> - 5.93-1
- Update to 5.93 - Update to 5.93

Loading…
Cancel
Save