commit:     234192ae8404034c30f4d88632d85190ee8776d2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  9 15:29:24 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr  9 16:03:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=234192ae

kde-frameworks/plasma: PC3 toggle controls: fix blurry buttons

Upstream commit bd1ba6e539a326585a24fc21d0e27ef2c59e8731
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=447977

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/plasma-5.92.0-fix-blurry-buttons.patch   | 110 +++++++++++++++++++++
 kde-frameworks/plasma/plasma-5.92.0-r2.ebuild      |  78 +++++++++++++++
 2 files changed, 188 insertions(+)

diff --git a/kde-frameworks/plasma/files/plasma-5.92.0-fix-blurry-buttons.patch 
b/kde-frameworks/plasma/files/plasma-5.92.0-fix-blurry-buttons.patch
new file mode 100644
index 000000000000..0286039ddb7b
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.92.0-fix-blurry-buttons.patch
@@ -0,0 +1,110 @@
+From bd1ba6e539a326585a24fc21d0e27ef2c59e8731 Mon Sep 17 00:00:00 2001
+From: Noah Davis <[email protected]>
+Date: Wed, 6 Apr 2022 15:08:53 -0400
+Subject: [PATCH] PC3 toggle controls: fix odd heights misaligning indicators
+
+BUG: 447977
+---
+ src/declarativeimports/plasmacomponents3/CheckBox.qml       | 2 +-
+ src/declarativeimports/plasmacomponents3/CheckDelegate.qml  | 2 +-
+ src/declarativeimports/plasmacomponents3/MenuItem.qml       | 2 +-
+ src/declarativeimports/plasmacomponents3/RadioButton.qml    | 2 +-
+ src/declarativeimports/plasmacomponents3/RadioDelegate.qml  | 2 +-
+ src/declarativeimports/plasmacomponents3/Switch.qml         | 2 +-
+ src/declarativeimports/plasmacomponents3/SwitchDelegate.qml | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/declarativeimports/plasmacomponents3/CheckBox.qml 
b/src/declarativeimports/plasmacomponents3/CheckBox.qml
+index 1da39da24..fed972566 100644
+--- a/src/declarativeimports/plasmacomponents3/CheckBox.qml
++++ b/src/declarativeimports/plasmacomponents3/CheckBox.qml
+@@ -35,7 +35,7 @@ T.CheckBox {
+ 
+     indicator: CheckIndicator {
+         x: !control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+         control: control
+     }
+ 
+diff --git a/src/declarativeimports/plasmacomponents3/CheckDelegate.qml 
b/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
+index ef965becd..9d241467b 100644
+--- a/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
++++ b/src/declarativeimports/plasmacomponents3/CheckDelegate.qml
+@@ -47,7 +47,7 @@ T.CheckDelegate {
+ 
+     indicator: CheckIndicator {
+         x: control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+ 
+         control: control
+     }
+diff --git a/src/declarativeimports/plasmacomponents3/MenuItem.qml 
b/src/declarativeimports/plasmacomponents3/MenuItem.qml
+index 16f2a5e36..964c5930d 100644
+--- a/src/declarativeimports/plasmacomponents3/MenuItem.qml
++++ b/src/declarativeimports/plasmacomponents3/MenuItem.qml
+@@ -81,7 +81,7 @@ T.MenuItem {
+ 
+     indicator: Loader {
+         x: controlRoot.mirrored ? controlRoot.width - width - 
controlRoot.rightPadding : controlRoot.leftPadding
+-        y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2
++        y: controlRoot.topPadding + Math.round((controlRoot.availableHeight - 
height) / 2)
+ 
+         visible: controlRoot.checkable
+         sourceComponent: controlRoot.autoExclusive ? radioComponent : 
checkComponent
+diff --git a/src/declarativeimports/plasmacomponents3/RadioButton.qml 
b/src/declarativeimports/plasmacomponents3/RadioButton.qml
+index 7eeee3f9b..0b7a19894 100644
+--- a/src/declarativeimports/plasmacomponents3/RadioButton.qml
++++ b/src/declarativeimports/plasmacomponents3/RadioButton.qml
+@@ -32,7 +32,7 @@ T.RadioButton {
+ 
+     indicator: RadioIndicator {
+         x: !control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+         control: control
+     }
+ 
+diff --git a/src/declarativeimports/plasmacomponents3/RadioDelegate.qml 
b/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
+index e25f28cc3..a915a4eac 100644
+--- a/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
++++ b/src/declarativeimports/plasmacomponents3/RadioDelegate.qml
+@@ -47,7 +47,7 @@ T.RadioDelegate {
+ 
+     indicator: RadioIndicator {
+         x: control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+ 
+         control: control
+     }
+diff --git a/src/declarativeimports/plasmacomponents3/Switch.qml 
b/src/declarativeimports/plasmacomponents3/Switch.qml
+index 32ef1274b..98de41388 100644
+--- a/src/declarativeimports/plasmacomponents3/Switch.qml
++++ b/src/declarativeimports/plasmacomponents3/Switch.qml
+@@ -32,7 +32,7 @@ T.Switch {
+ 
+     indicator: SwitchIndicator {
+         x: !control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+         control: control
+     }
+ 
+diff --git a/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml 
b/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
+index e6adf9a6e..0f3db70de 100644
+--- a/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
++++ b/src/declarativeimports/plasmacomponents3/SwitchDelegate.qml
+@@ -45,7 +45,7 @@ T.SwitchDelegate {
+ 
+     indicator: SwitchIndicator {
+         x: control.mirrored ? control.leftPadding : control.width - width - 
control.rightPadding
+-        y: control.topPadding + (control.availableHeight - height) / 2
++        y: control.topPadding + Math.round((control.availableHeight - height) 
/ 2)
+ 
+         control: control
+     }
+-- 
+GitLab
+

diff --git a/kde-frameworks/plasma/plasma-5.92.0-r2.ebuild 
b/kde-frameworks/plasma/plasma-5.92.0-r2.ebuild
new file mode 100644
index 000000000000..8d660fd871a3
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.92.0-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_NAME="${PN}-framework"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Plasma framework"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="gles2-only man wayland X"
+
+RESTRICT="test"
+
+RDEPEND="
+       >=dev-qt/qtdbus-${QTMIN}:5
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X=]
+       >=dev-qt/qtquickcontrols-${QTMIN}:5
+       >=dev-qt/qtsql-${QTMIN}:5
+       >=dev-qt/qtsvg-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       =kde-frameworks/kactivities-${PVCUT}*:5
+       =kde-frameworks/karchive-${PVCUT}*:5
+       =kde-frameworks/kconfig-${PVCUT}*:5
+       =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+       =kde-frameworks/kcoreaddons-${PVCUT}*:5
+       =kde-frameworks/kdeclarative-${PVCUT}*:5
+       =kde-frameworks/kglobalaccel-${PVCUT}*:5
+       =kde-frameworks/kguiaddons-${PVCUT}*:5
+       =kde-frameworks/ki18n-${PVCUT}*:5
+       =kde-frameworks/kiconthemes-${PVCUT}*:5
+       =kde-frameworks/kio-${PVCUT}*:5
+       =kde-frameworks/kirigami-${PVCUT}*:5
+       =kde-frameworks/knotifications-${PVCUT}*:5
+       =kde-frameworks/kpackage-${PVCUT}*:5
+       =kde-frameworks/kservice-${PVCUT}*:5
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+       =kde-frameworks/kwindowsystem-${PVCUT}*:5
+       =kde-frameworks/kxmlgui-${PVCUT}*:5
+       !gles2-only? ( media-libs/libglvnd[X?] )
+       wayland? (
+               =kde-frameworks/kwayland-${PVCUT}*:5
+               media-libs/libglvnd
+       )
+       X? (
+               >=dev-qt/qtx11extras-${QTMIN}:5
+               x11-libs/libX11
+               x11-libs/libxcb
+       )
+"
+DEPEND="${RDEPEND}
+       X? ( x11-base/xorg-proto )
+"
+BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )"
+
+PATCHES=(
+       "${FILESDIR}/${P}-breeze-light-dark-visual-fix.patch"
+       "${FILESDIR}/${P}-fix-blurry-buttons.patch" # KDE-bug 447977
+)
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake_use_find_package !gles2-only OpenGL)
+               $(cmake_use_find_package man KF5DocTools)
+               $(cmake_use_find_package wayland EGL)
+               $(cmake_use_find_package wayland KF5Wayland)
+               $(cmake_use_find_package X X11)
+               $(cmake_use_find_package X XCB)
+       )
+
+       ecm_src_configure
+}

Reply via email to