From 36983faed4a33181aa02d5843a4cd0c02098f1fc5a42d7db34dad31b349ec2ce Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Fri, 14 Sep 2018 13:48:43 +0000 Subject: [PATCH] KDE Frameworks 5.50.0 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcmutils?expand=0&rev=157 --- ...lly-resize-KCMUtilDialog-to-sizeHint.patch | 72 +++++++++++++++ ...llArea-with-size-hint-not-limited-by.patch | 87 ------------------- kcmutils-5.49.0.tar.xz | 3 - kcmutils-5.50.0.tar.xz | 3 + kcmutils.changes | 15 ++++ kcmutils.spec | 8 +- 6 files changed, 94 insertions(+), 94 deletions(-) create mode 100644 0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch delete mode 100644 0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch delete mode 100644 kcmutils-5.49.0.tar.xz create mode 100644 kcmutils-5.50.0.tar.xz diff --git a/0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch b/0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch new file mode 100644 index 0000000..9d0dc46 --- /dev/null +++ b/0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch @@ -0,0 +1,72 @@ +From cc4ecfdcd48a52a67f60eb69ed69e91ca42ee405 Mon Sep 17 00:00:00 2001 +From: Valeriy Malov +Date: Mon, 10 Sep 2018 17:39:40 +0300 +Subject: [PATCH] Manually resize KCMUtilDialog to sizeHint() + +Summary: +Workaround for https://bugreports.qt.io/browse/QTBUG-3459 + +Currently adjustSize() is limited to 2/3 of the screen size for windows +This adds unnecessary scrollbars on dialogs that would otherwise fit the +screen +Manually resize the window after adjustSize() happens to avoid this +limitation + +CCBUG: 389585 + +Test Plan: +Tested on a 1366x768 laptop, with this patch networkmanagement window opens +in full screen height (respecting the panel) + +Reviewers: #frameworks, ngraham + +Reviewed By: ngraham + +Subscribers: davidedmundson, acrouthamel, kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D15406 +--- + src/kcmultidialog.cpp | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/kcmultidialog.cpp b/src/kcmultidialog.cpp +index d5f2f10..2fd7cb8 100644 +--- a/src/kcmultidialog.cpp ++++ b/src/kcmultidialog.cpp +@@ -27,8 +27,10 @@ + + #include "kcmoduleproxy.h" + ++#include + #include + #include ++#include + #include + #include + #include +@@ -261,9 +263,18 @@ KCMultiDialog::~KCMultiDialog() + + void KCMultiDialog::showEvent(QShowEvent *ev) + { +- resize(QSize(800, 550)); +- adjustSize(); + KPageDialog::showEvent(ev); ++ adjustSize(); ++ /** ++ * adjustSize() relies on sizeHint but is limited to 2/3 of the desktop size ++ * Workaround for https://bugreports.qt.io/browse/QTBUG-3459 ++ * ++ * We adjust the size after passing the show event ++ * because otherwise window pos is set to (0,0) ++ */ ++ const QSize maxSize = QApplication::desktop()->availableGeometry(pos()).size(); ++ resize(qMin(sizeHint().width(), maxSize.width()), ++ qMin(sizeHint().height(), maxSize.height())); + } + + void KCMultiDialog::slotDefaultClicked() +-- +2.18.0 + diff --git a/0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch b/0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch deleted file mode 100644 index 0a4bdf9..0000000 --- a/0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 23ba2b37ef825f0efccc169455f45b0dcdac97cf Mon Sep 17 00:00:00 2001 -From: Valeriy Malov -Date: Wed, 8 Aug 2018 16:42:00 +0300 -Subject: [PATCH] Use custom QScrollArea with size hint not limited by font - size - -Summary: -For some reason original QScrollArea has constraint on a size hint -This causes large KCMShell pages open in relatively small windows, -because QScrollArea inside reports small size hint - -BUG: 389585 - -Test Plan: -patched 5.48.0 with this, tested networkmanager and few other kcms, -they now seem to open in full size (except for kscreen which has custom sizehint, -it probably needs size hint for the QML area specifically, not the whole window; -and except for opengl that has it's own scrollable area which needs a size hint too) - -Reviewers: #frameworks, ngraham - -Reviewed By: ngraham - -Subscribers: ngraham, kde-frameworks-devel - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D14692 ---- - src/kcmultidialog.cpp | 2 +- - src/kcmultidialog.h | 22 ++++++++++++++++++++++ - 2 files changed, 23 insertions(+), 1 deletion(-) - -diff --git a/src/kcmultidialog.cpp b/src/kcmultidialog.cpp -index 6526efb..d5f2f10 100644 ---- a/src/kcmultidialog.cpp -+++ b/src/kcmultidialog.cpp -@@ -425,7 +425,7 @@ KPageWidgetItem *KCMultiDialog::addModule(const KCModuleInfo &moduleInfo, - } - - // Create the scroller -- QScrollArea *moduleScroll = new QScrollArea(this); -+ auto *moduleScroll = new UnboundScrollArea(this); - // Prepare the scroll area - moduleScroll->setWidgetResizable(true); - moduleScroll->setFrameStyle(QFrame::NoFrame); -diff --git a/src/kcmultidialog.h b/src/kcmultidialog.h -index c405dc3..2073be5 100644 ---- a/src/kcmultidialog.h -+++ b/src/kcmultidialog.h -@@ -23,6 +23,8 @@ - #ifndef KCMULTIDIALOG_H - #define KCMULTIDIALOG_H - -+#include -+ - #include - #include - -@@ -180,4 +182,24 @@ private: - Q_PRIVATE_SLOT(d_func(), void _k_updateHeader(bool use, const QString &message)) - }; - -+/** -+ * @brief Custom QScrollArea class that doesn't limit its size hint -+ * -+ * See original QScrollArea::sizeHint() function, -+ * where the size hint is bound by 36*24 font heights -+ * -+ * Workaround for https://bugreports.qt.io/browse/QTBUG-10459 -+ */ -+ -+class UnboundScrollArea : public QScrollArea { -+ Q_OBJECT -+public: -+ QSize sizeHint() const override { -+ return widget() ? widget()->sizeHint() : QSize(); -+ } -+ -+ UnboundScrollArea(QWidget * w) : QScrollArea(w) {} -+ virtual ~UnboundScrollArea() = default; -+}; -+ - #endif --- -2.18.0 - diff --git a/kcmutils-5.49.0.tar.xz b/kcmutils-5.49.0.tar.xz deleted file mode 100644 index cd88fa0..0000000 --- a/kcmutils-5.49.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:388587f864352e98670c41a9fb615cc6580c42b2b026041a341202976e4a6877 -size 236748 diff --git a/kcmutils-5.50.0.tar.xz b/kcmutils-5.50.0.tar.xz new file mode 100644 index 0000000..21e14a8 --- /dev/null +++ b/kcmutils-5.50.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d70e08568a16cb294fae094383afdd4565f2fc39d8020fb347d35807c4453fe1 +size 236768 diff --git a/kcmutils.changes b/kcmutils.changes index 766de79..2971312 100644 --- a/kcmutils.changes +++ b/kcmutils.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Sep 13 21:58:44 UTC 2018 - lbeltrame@kde.org + +- Update to 5.50.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.50.0.php +- Changes since 5.49.0: + * Use custom QScrollArea with size hint not limited by font size (kde#389585) +- Dropped patches, now upstream: + * 0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch +- Add upstream patch 0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch: + * Workaround for QTBUG-3459 to prevent too small windows when + system settings modules are opened standalone (kde#389585) + ------------------------------------------------------------------- Tue Aug 28 16:49:02 UTC 2018 - fabian@ritter-vogt.de diff --git a/kcmutils.spec b/kcmutils.spec index 27a42df..9c530bc 100644 --- a/kcmutils.spec +++ b/kcmutils.spec @@ -12,19 +12,19 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define lname libKF5KCMUtils5 -%define _tar_path 5.49 +%define _tar_path 5.50 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: kcmutils -Version: 5.49.0 +Version: 5.50.0 Release: 0 Summary: Classes to work with KCModules License: LGPL-2.1-or-later @@ -33,7 +33,7 @@ URL: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz Source1: baselibs.conf # PATCH-FIX-UPSTREAM -Patch1: 0001-Use-custom-QScrollArea-with-size-hint-not-limited-by.patch +Patch0: 0001-Manually-resize-KCMUtilDialog-to-sizeHint.patch BuildRequires: cmake >= 3.0 BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes