diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-06-09 21:48:16 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-06-10 19:52:31 +0200 |
commit | 23912c864cdfade33169b73a3bf5c819c8683df8 (patch) | |
tree | 924b6db2f8b84ac95c0d68dc7532d182b15dd022 /dev-qt/qtquickcontrols2 | |
parent | dev-qt/qtdeclarative: Fix QQuickMouseArea get stuck in pressed state (diff) | |
download | gentoo-23912c864cdfade33169b73a3bf5c819c8683df8.tar.gz gentoo-23912c864cdfade33169b73a3bf5c819c8683df8.tar.bz2 gentoo-23912c864cdfade33169b73a3bf5c819c8683df8.zip |
dev-qt/qtquickcontrols2: Menu: account for scale before positioning
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt/qtquickcontrols2')
-rw-r--r-- | dev-qt/qtquickcontrols2/files/qtquickcontrols2-5.14.2-account-for-scale-before-positioning.patch | 61 | ||||
-rw-r--r-- | dev-qt/qtquickcontrols2/qtquickcontrols2-5.14.2-r1.ebuild | 34 |
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-qt/qtquickcontrols2/files/qtquickcontrols2-5.14.2-account-for-scale-before-positioning.patch b/dev-qt/qtquickcontrols2/files/qtquickcontrols2-5.14.2-account-for-scale-before-positioning.patch new file mode 100644 index 000000000000..ae54f12f3652 --- /dev/null +++ b/dev-qt/qtquickcontrols2/files/qtquickcontrols2-5.14.2-account-for-scale-before-positioning.patch @@ -0,0 +1,61 @@ +From 4df52eee2b40244ba1a3d115a43ed51cfd742105 Mon Sep 17 00:00:00 2001 +From: Andy Shaw <andy.shaw@qt.io> +Date: Thu, 7 Feb 2019 17:35:51 +0100 +Subject: [PATCH] Menu: account for the scale when getting the size before + positioning + +Fixes: QTBUG-73687 +Change-Id: Id2d6a6b5c6651337ab7ae26d07011160b79654bf +Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> +--- + src/quicktemplates2/qquickpopup.cpp | 1 + + src/quicktemplates2/qquickpopuppositioner.cpp | 14 +++++++------- + 3 files changed, 17 insertions(+), 15 deletions(-) + +diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp +index ecb2568ed..d108420ea 100644 +--- a/src/quicktemplates2/qquickpopup.cpp ++++ b/src/quicktemplates2/qquickpopup.cpp +@@ -471,6 +471,7 @@ void QQuickPopupPrivate::finalizeEnterTransition() + if (focus) + popupItem->setFocus(true); + transitionState = NoTransition; ++ getPositioner()->reposition(); + emit q->openedChanged(); + emit q->opened(); + } +diff --git a/src/quicktemplates2/qquickpopuppositioner.cpp b/src/quicktemplates2/qquickpopuppositioner.cpp +index ebd8ff294..dbe8ac1d5 100644 +--- a/src/quicktemplates2/qquickpopuppositioner.cpp ++++ b/src/quicktemplates2/qquickpopuppositioner.cpp +@@ -108,10 +108,11 @@ void QQuickPopupPositioner::reposition() + return; + } + +- const qreal w = popupItem->width(); +- const qreal h = popupItem->height(); +- const qreal iw = popupItem->implicitWidth(); +- const qreal ih = popupItem->implicitHeight(); ++ const qreal scale = popupItem->scale(); ++ const qreal w = popupItem->width() * scale; ++ const qreal h = popupItem->height() * scale; ++ const qreal iw = popupItem->implicitWidth() * scale; ++ const qreal ih = popupItem->implicitHeight() * scale; + + bool widthAdjusted = false; + bool heightAdjusted = false; +@@ -257,10 +258,9 @@ void QQuickPopupPositioner::reposition() + } + + if (!p->hasWidth && widthAdjusted && rect.width() > 0) +- popupItem->setWidth(rect.width()); ++ popupItem->setWidth(rect.width() / scale); + if (!p->hasHeight && heightAdjusted && rect.height() > 0) +- popupItem->setHeight(rect.height()); +- ++ popupItem->setHeight(rect.height() / scale); + m_positioning = false; + } + +-- +2.16.3 diff --git a/dev-qt/qtquickcontrols2/qtquickcontrols2-5.14.2-r1.ebuild b/dev-qt/qtquickcontrols2/qtquickcontrols2-5.14.2-r1.ebuild new file mode 100644 index 000000000000..f91b09dc54ce --- /dev/null +++ b/dev-qt/qtquickcontrols2/qtquickcontrols2-5.14.2-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit qt5-build + +DESCRIPTION="Set of next generation Qt Quick controls for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +IUSE="widgets" + +DEPEND=" + ~dev-qt/qtcore-${PV} + ~dev-qt/qtdeclarative-${PV} + ~dev-qt/qtgui-${PV} + widgets? ( ~dev-qt/qtwidgets-${PV} ) +" +RDEPEND="${DEPEND} + ~dev-qt/qtgraphicaleffects-${PV} +" + +PATCHES=( + "${FILESDIR}/${P}-account-for-scale-before-positioning.patch" # QTBUG-73687 +) + +src_prepare() { + qt_use_disable_mod widgets widgets \ + src/imports/platform/platform.pro + + qt5-build_src_prepare +} |