public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/breeze/, kde-plasma/breeze/files/
@ 2021-05-29 21:19 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-05-29 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     79ed50f28c3c915c71608be59d6b1fd7b326d814
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 20:12:57 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 29 21:16:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79ed50f2

kde-plasma/breeze: Fix splitter proxy

Upstream commit f99b7ef621c9c69544158d245699fd8104db6753

See also:
https://mail.kde.org/pipermail/distributions/2021-May/001012.html

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=436473
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/breeze/breeze-5.21.5-r1.ebuild          | 53 ++++++++++++++++++++++
 .../files/breeze-5.21.5-fix-splitter-proxy.patch   | 50 ++++++++++++++++++++
 2 files changed, 103 insertions(+)

diff --git a/kde-plasma/breeze/breeze-5.21.5-r1.ebuild b/kde-plasma/breeze/breeze-5.21.5-r1.ebuild
new file mode 100644
index 00000000000..c87f6e948b9
--- /dev/null
+++ b/kde-plasma/breeze/breeze-5.21.5-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.82.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Breeze visual style for the Plasma desktop"
+HOMEPAGE="https://invent.kde.org/plasma/breeze"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="X"
+
+RDEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/frameworkintegration-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kguiaddons-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	X? ( x11-libs/libxcb )
+"
+DEPEND="${RDEPEND}
+	>=kde-frameworks/kpackage-${KFMIN}:5
+"
+PDEPEND="
+	>=kde-frameworks/breeze-icons-${KFMIN}:5
+	>=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-splitter-proxy.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package X XCB)
+	)
+	ecm_src_configure
+}

diff --git a/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch b/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch
new file mode 100644
index 00000000000..52646721a4b
--- /dev/null
+++ b/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch
@@ -0,0 +1,50 @@
+From f99b7ef621c9c69544158d245699fd8104db6753 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Sat, 15 May 2021 17:45:54 +0200
+Subject: [PATCH] Fix informing the underlying widget when leaving
+ SplitterProxy
+
+While the SplitterProxy is active, it intercepts all relevant events, so that
+the underlying widget still thinks it's in the same "on splitter" state. When
+the SplitterProxy is left, the underlying widget is sent a HoverLeave/HoverMove
+event to make it aware of the new current cursor position. Without this, it
+doesn't know that it's not supposed to be in the "on splitter" state, and when
+it regains focus it just re-activates the SplitterProxy at the current cursor
+position.
+
+This was broken by accident in d201a1f187 ("Fix SplitterProxy not clearing
+when above another QSplitterHandle"), which moved the hide() call past the
+call to QCoreApplication::sendEvent. Previously that made isVisible() false,
+which also prevented the interception of the HoverLeave/HoverMove events.
+
+BUG: 436473
+---
+ kstyle/breezesplitterproxy.cpp | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/kstyle/breezesplitterproxy.cpp b/kstyle/breezesplitterproxy.cpp
+index 0cf5685f..d4db407b 100644
+--- a/kstyle/breezesplitterproxy.cpp
++++ b/kstyle/breezesplitterproxy.cpp
+@@ -341,11 +341,14 @@ namespace Breeze
+         // send hover event
+         if( _splitter )
+         {
+-            QHoverEvent hoverEvent(
+-                qobject_cast<QSplitterHandle*>(_splitter.data()) ? QEvent::HoverLeave : QEvent::HoverMove,
+-                _splitter.data()->mapFromGlobal(QCursor::pos()), _hook);
+-            QCoreApplication::sendEvent( _splitter.data(), &hoverEvent );
++            // SplitterProxy intercepts HoverLeave/HoverMove events to _splitter,
++            // but this is meant to reach it directly. Unset _splitter to stop interception.
++            auto splitter = _splitter;
+             _splitter.clear();
++            QHoverEvent hoverEvent(
++                qobject_cast<QSplitterHandle*>(splitter.data()) ? QEvent::HoverLeave : QEvent::HoverMove,
++                splitter.data()->mapFromGlobal(QCursor::pos()), _hook);
++            QCoreApplication::sendEvent( splitter.data(), &hoverEvent );
+         }
+ 
+         // kill timer if any
+-- 
+GitLab
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/breeze/, kde-plasma/breeze/files/
@ 2022-07-26 12:08 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2022-07-26 12:08 UTC (permalink / raw
  To: gentoo-commits

commit:     380ca721deb83c60564370ee909796a120fe2d54
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 23:03:43 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 12:04:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=380ca721

kde-plasma/breeze: kstyle: fix qqc2 desktop style sliders in RtL

Upstream commits:
c7bfd1c728c603464cab9a43a0627a82d1ab0933
b51316269ff02c84648667df97563bacd2538b6c

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=430101
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/breeze/breeze-5.24.6-r1.ebuild          | 54 +++++++++++++++
 ...-5.24.6-fix-qqc2-progressbar-style-in-rtl.patch | 58 +++++++++++++++++
 .../breeze-5.24.6-fix-qqc2-sliders-in-rtl.patch    | 76 ++++++++++++++++++++++
 3 files changed, 188 insertions(+)

diff --git a/kde-plasma/breeze/breeze-5.24.6-r1.ebuild b/kde-plasma/breeze/breeze-5.24.6-r1.ebuild
new file mode 100644
index 000000000000..503fdca4df41
--- /dev/null
+++ b/kde-plasma/breeze/breeze-5.24.6-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.92.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.4
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Breeze visual style for the Plasma desktop"
+HOMEPAGE="https://invent.kde.org/plasma/breeze"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="X"
+
+RDEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/frameworkintegration-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kguiaddons-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	X? ( x11-libs/libxcb )
+"
+DEPEND="${RDEPEND}"
+PDEPEND="
+	>=kde-frameworks/breeze-icons-${KFMIN}:5
+	>=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-qqc2-sliders-in-rtl.patch" # KDE-bug #430101
+	"${FILESDIR}/${P}-fix-qqc2-progressbar-style-in-rtl.patch" # KDE-bug #430101
+)
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package X XCB)
+	)
+	ecm_src_configure
+}

diff --git a/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-progressbar-style-in-rtl.patch b/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-progressbar-style-in-rtl.patch
new file mode 100644
index 000000000000..36e4f952d980
--- /dev/null
+++ b/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-progressbar-style-in-rtl.patch
@@ -0,0 +1,58 @@
+From d7c0ab28df83eb4a4c39495a25e609047c735d59 Mon Sep 17 00:00:00 2001
+From: ivan tkachenko <me@ratijas.tk>
+Date: Sat, 4 Jun 2022 05:00:53 +0300
+Subject: [PATCH] KStyle: Fix QQC2 ProgressBar desktop style in RTL layout
+ direction
+
+BUG: 430101
+
+(cherry picked from commit 2bf9fc4c7be280e2b77f7c150855e0fca0b80d9a)
+
+* asturm 2022-07-26: Merged with clang-format changes in commit
+  32149dc002ae574ed41f111bf52712b1765b906b
+
+---
+ kstyle/breezestyle.cpp | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp
+index c9fba292..0d7a8432 100644
+--- a/kstyle/breezestyle.cpp
++++ b/kstyle/breezestyle.cpp
+@@ -1749,23 +1749,27 @@ namespace Breeze
+         const bool horizontal( BreezePrivate::isProgressBarHorizontal( progressBarOption ) );
+ 
+         // check inverted appearance
+-        const bool inverted( progressBarOption->invertedAppearance );
++        bool inverted(progressBarOption->invertedAppearance);
++        if (horizontal) {
++            // un-invert in RTL layout
++            inverted ^= option->direction == Qt::RightToLeft;
++        }
+ 
+         // get progress and steps
+-        const qreal progress( progressBarOption->progress - progressBarOption->minimum );
++        const int progress(progressBarOption->progress - progressBarOption->minimum);
+         const int steps( qMax( progressBarOption->maximum  - progressBarOption->minimum, 1 ) );
+ 
+         //Calculate width fraction
+-        const qreal widthFrac = qMin( qreal(1), progress/steps );
++        const qreal position = qreal(progress) / qreal(steps);
++        const qreal visualPosition = inverted ? 1 - position : position;
+ 
+         // convert the pixel width
+-        const int indicatorSize( widthFrac*( horizontal ? rect.width():rect.height() ) );
++        const int indicatorSize(visualPosition * (horizontal ? rect.width() : rect.height()));
+ 
+         QRect indicatorRect;
+         if( horizontal )
+         {
+-
+-            indicatorRect = QRect( inverted ? ( rect.right() - indicatorSize + 1):rect.left(), rect.y(), indicatorSize, rect.height() );
++            indicatorRect = QRect(rect.left(), rect.y(), indicatorSize, rect.height());
+             indicatorRect = visualRect( option->direction, rect, indicatorRect );
+ 
+         } else indicatorRect = QRect( rect.x(), inverted ? rect.top() : (rect.bottom() - indicatorSize + 1), rect.width(), indicatorSize );
+-- 
+2.35.1
+

diff --git a/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-sliders-in-rtl.patch b/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-sliders-in-rtl.patch
new file mode 100644
index 000000000000..b8b3504a0a0e
--- /dev/null
+++ b/kde-plasma/breeze/files/breeze-5.24.6-fix-qqc2-sliders-in-rtl.patch
@@ -0,0 +1,76 @@
+From 53f24305536850b244b730f9a04024daf02e753b Mon Sep 17 00:00:00 2001
+From: Jan Blackquill <uhhadd@gmail.com>
+Date: Fri, 3 Jun 2022 17:34:02 -0400
+Subject: [PATCH] kstyle: fix qqc2 desktop style sliders in RtL
+
+We don't do any mirroring of the slider groove rects or tickmarks based on layout direction,
+and this causes qqc2-desktop-style sliders to render in the wrong direction.
+Swapping the leftRect and the rightRect when option->direction == Qt::RightToLeft
+fixes this.
+
+This wasn't broken with QWidgets because QSlider relies on (ab)using the upsideDown option
+in order to achieve mirroring of the groove instead of option->direction, and consequently,
+this change doesn't affect Qt widgets apps at all.
+
+BUG: 430101
+(cherry picked from commit e8b1d4aa47daf99041332f43c29fabdf70f25004)
+
+* asturm 2022-07-26: Merged with clang-format changes in commit
+  32149dc002ae574ed41f111bf52712b1765b906b
+
+---
+ kstyle/breezestyle.cpp | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp
+index 2ef2ea98..c9fba292 100644
+--- a/kstyle/breezestyle.cpp
++++ b/kstyle/breezestyle.cpp
+@@ -51,6 +51,7 @@
+ #include <QDialogButtonBox>
+ #include <QGraphicsItem>
+ #include <QGraphicsProxyWidget>
++#include <qnamespace.h>
+ 
+ #if BREEZE_HAVE_QTQUICK
+ #include <QQuickWindow>
+@@ -6679,6 +6680,7 @@ namespace Breeze
+                 }
+ 
+                 // colors
++                const auto reverseTicks = option->direction == Qt::LeftToRight ? upsideDown : !upsideDown;
+                 const auto base( _helper->separatorColor( palette ) );
+                 const auto &highlight = hasHighlightNeutral( widget, option, mouseOver, hasFocus ) ? _helper->neutralText( palette ) : palette.color( QPalette::Highlight );
+ 
+@@ -6693,8 +6695,8 @@ namespace Breeze
+                     int position( sliderPositionFromValue( sliderOption->minimum, sliderOption->maximum, current, available ) + fudge );
+                     foreach( const QLine& tickLine, tickLines )
+                     {
+-                        if( horizontal ) painter->drawLine( tickLine.translated( upsideDown ? (rect.width() - position) : position, 0 ) );
+-                        else painter->drawLine( tickLine.translated( 0, upsideDown ? (rect.height() - position):position ) );
++                        if( horizontal ) painter->drawLine(tickLine.translated(reverseTicks ? (rect.width() - position) : position, 0));
++                        else painter->drawLine(tickLine.translated(0, reverseTicks ? (rect.height() - position) : position));
+                     }
+ 
+                     // go to next position
+@@ -6729,11 +6731,15 @@ namespace Breeze
+ 
+                     auto leftRect( grooveRect );
+                     leftRect.setRight( handleRect.right() - Metrics::Slider_ControlThickness/2 );
+-                    _helper->renderSliderGroove( painter, leftRect, upsideDown ? grooveColor:highlight );
+ 
+                     auto rightRect( grooveRect );
+                     rightRect.setLeft( handleRect.left() + Metrics::Slider_ControlThickness/2 );
+-                    _helper->renderSliderGroove( painter, rightRect, upsideDown ? highlight:grooveColor );
++
++                    if (option->direction == Qt::RightToLeft)
++                        std::swap(leftRect, rightRect);
++
++                    _helper->renderSliderGroove(painter, leftRect, upsideDown ? grooveColor : highlight);
++                    _helper->renderSliderGroove(painter, rightRect, upsideDown ? highlight : grooveColor);
+ 
+                 } else {
+ 
+-- 
+2.35.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-26 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29 21:19 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/breeze/, kde-plasma/breeze/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 12:08 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox