Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kdeclarative/, kde-frameworks/kdeclarative/files/
Date: Wed, 29 Jun 2022 19:53:33
Message-Id: 1656532397.aa54e46154aa952caf3a967b9401536c8848272b.asturm@gentoo
1 commit: aa54e46154aa952caf3a967b9401536c8848272b
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 19:41:57 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 19:53:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa54e461
7
8 kde-frameworks/kdeclarative: qmlcontrols: add Pad fill mode in QImageItem
9
10 Upstream commit 41b3d0b142387c3acbba73f6ac332b3f314f7700
11 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=389623
12
13 Package-Manager: Portage-3.0.30, Repoman-3.0.3
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../kdeclarative-5.95.0-fix-potd-centered.patch | 54 ++++++++++++++++++++++
17 .../kdeclarative/kdeclarative-5.95.0-r1.ebuild | 37 +++++++++++++++
18 2 files changed, 91 insertions(+)
19
20 diff --git a/kde-frameworks/kdeclarative/files/kdeclarative-5.95.0-fix-potd-centered.patch b/kde-frameworks/kdeclarative/files/kdeclarative-5.95.0-fix-potd-centered.patch
21 new file mode 100644
22 index 000000000000..cac44a4333bf
23 --- /dev/null
24 +++ b/kde-frameworks/kdeclarative/files/kdeclarative-5.95.0-fix-potd-centered.patch
25 @@ -0,0 +1,54 @@
26 +From 41b3d0b142387c3acbba73f6ac332b3f314f7700 Mon Sep 17 00:00:00 2001
27 +From: Fushan Wen <qydwhotmail@×××××.com>
28 +Date: Thu, 9 Jun 2022 12:57:55 +0800
29 +Subject: [PATCH] qmlcontrols: add `Pad` fill mode in `QImageItem`
30 +
31 +This matches the behavior in `QQuickImage`.
32 +
33 +BUG: 389623
34 +FIXED-IN: 5.96
35 +---
36 + src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp | 7 ++++++-
37 + src/qmlcontrols/kquickcontrolsaddons/qimageitem.h | 1 +
38 + 2 files changed, 7 insertions(+), 1 deletion(-)
39 +
40 +diff --git a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp
41 +index 36929eed..060069a1 100644
42 +--- a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp
43 ++++ b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp
44 +@@ -103,7 +103,11 @@ void QImageItem::paint(QPainter *painter)
45 + painter->scale(1, height() / (qreal)m_image.height());
46 + }
47 +
48 +- if (m_fillMode >= Tile) {
49 ++ if (m_fillMode == Pad) {
50 ++ QRect centeredRect = m_paintedRect;
51 ++ centeredRect.moveCenter(m_image.rect().center());
52 ++ painter->drawImage(m_paintedRect, m_image, centeredRect);
53 ++ } else if (m_fillMode >= Tile) {
54 + painter->drawTiledPixmap(m_paintedRect, QPixmap::fromImage(m_image));
55 + } else {
56 + painter->drawImage(m_paintedRect, m_image, m_image.rect());
57 +@@ -174,6 +178,7 @@ void QImageItem::updatePaintedRect()
58 + }
59 + case Stretch:
60 + case Tile:
61 ++ case Pad:
62 + default:
63 + destRect = boundingRect().toRect();
64 + }
65 +diff --git a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h
66 +index f32ae7da..ba38a4a1 100644
67 +--- a/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h
68 ++++ b/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h
69 +@@ -32,6 +32,7 @@ public:
70 + Tile, // the image is duplicated horizontally and vertically
71 + TileVertically, // the image is stretched horizontally and tiled vertically
72 + TileHorizontally, // the image is stretched vertically and tiled horizontally
73 ++ Pad, /**< the image is not transformed @since 5.96 **/
74 + };
75 + Q_ENUM(FillMode)
76 +
77 +--
78 +GitLab
79 +
80
81 diff --git a/kde-frameworks/kdeclarative/kdeclarative-5.95.0-r1.ebuild b/kde-frameworks/kdeclarative/kdeclarative-5.95.0-r1.ebuild
82 new file mode 100644
83 index 000000000000..6d2b7ad1ccae
84 --- /dev/null
85 +++ b/kde-frameworks/kdeclarative/kdeclarative-5.95.0-r1.ebuild
86 @@ -0,0 +1,37 @@
87 +# Copyright 1999-2022 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=8
91 +
92 +ECM_TEST="false"
93 +PVCUT=$(ver_cut 1-2)
94 +QTMIN=5.15.3
95 +inherit ecm kde.org
96 +
97 +DESCRIPTION="Framework providing integration of QML and KDE work spaces"
98 +
99 +LICENSE="LGPL-2+"
100 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
101 +IUSE=""
102 +
103 +DEPEND="
104 + >=dev-qt/qtdeclarative-${QTMIN}:5
105 + >=dev-qt/qtgui-${QTMIN}:5
106 + >=dev-qt/qtnetwork-${QTMIN}:5
107 + >=dev-qt/qtwidgets-${QTMIN}:5
108 + =kde-frameworks/kconfig-${PVCUT}*:5
109 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
110 + =kde-frameworks/kglobalaccel-${PVCUT}*:5
111 + =kde-frameworks/ki18n-${PVCUT}*:5
112 + =kde-frameworks/kiconthemes-${PVCUT}*:5
113 + =kde-frameworks/kio-${PVCUT}*:5
114 + =kde-frameworks/knotifications-${PVCUT}*:5
115 + =kde-frameworks/kpackage-${PVCUT}*:5
116 + =kde-frameworks/kservice-${PVCUT}*:5
117 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
118 + =kde-frameworks/kwindowsystem-${PVCUT}*:5
119 + media-libs/libepoxy
120 +"
121 +RDEPEND="${DEPEND}"
122 +
123 +PATCHES=( "${FILESDIR}/${P}-fix-potd-centered.patch" )