git » qqc2-desktop-style.git » commit 54c5cea

Fix palette menu in musescore (FS#67067)

author Antonio Rojas
2020-08-31 13:29:51 UTC
committer Antonio Rojas
2020-08-31 13:29:51 UTC
parent f255792f90075a38940da9e9085a1fd6b7edd879

Fix palette menu in musescore (FS#67067)

PKGBUILD +9 -3
kdebug-425949.patch +53 -0

diff --git a/PKGBUILD b/PKGBUILD
index ca77db6..445b9ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 
 pkgname=qqc2-desktop-style
 pkgver=5.73.0
-pkgrel=1
+pkgrel=2
 pkgdesc='A style for Qt Quick Controls 2 to make it follow your desktop theme'
 arch=(x86_64)
 url='https://community.kde.org/Frameworks'
@@ -10,11 +10,17 @@ license=(LGPL)
 groups=(kf5)
 depends=(kirigami2 kiconthemes)
 makedepends=(extra-cmake-modules)
-source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz"{,.sig})
+source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz"{,.sig}
+         kdebug-425949.patch)
 sha256sums=('290b3637be0c3740e92cdbb1421aef8bf1a8df36218f9d7d120e8422d14c3fdd'
-            'SKIP')
+            'SKIP'
+            'f8b58cc70e7d371e99a7a3740260d02285a12200fa0584320638cd1176d74d42')
 validpgpkeys=('53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB') # David Faure <faure@kde.org>
 
+prepare() {
+  patch -d $pkgname-$pkgver -p1 -i ../kdebug-425949.patch # Fix "add palette" menu in musescore
+}
+
 build() {
   cmake -B build -S $pkgname-$pkgver \
     -DBUILD_TESTING=OFF
diff --git a/kdebug-425949.patch b/kdebug-425949.patch
new file mode 100644
index 0000000..c53816d
--- /dev/null
+++ b/kdebug-425949.patch
@@ -0,0 +1,53 @@
+From 1f0f210ad1d8286ba7a8254664489f922cbba0c3 Mon Sep 17 00:00:00 2001
+From: Noah Davis <noahadvs@gmail.com>
+Date: Mon, 31 Aug 2020 08:14:54 -0400
+Subject: [PATCH] Don't use parent height/width for implicit ToolSeparator
+ sizing
+
+I realized this was pretty much all wrong, so I rewrote the whole thing with a structure inspired by the Default QQC2 theme.
+
+Padding property was removed since it was originally added to give the
+separator back the padding that it lost by having the same height as the
+parent.
+
+BUG: 425949
+---
+ org.kde.desktop/ToolSeparator.qml | 20 ++++++++------------
+ 1 file changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/org.kde.desktop/ToolSeparator.qml b/org.kde.desktop/ToolSeparator.qml
+index 7c33282..80d172f 100644
+--- a/org.kde.desktop/ToolSeparator.qml
++++ b/org.kde.desktop/ToolSeparator.qml
+@@ -12,20 +12,14 @@ import org.kde.kirigami 2.4 as Kirigami
+ T.ToolSeparator {
+     id: controlRoot
+ 
+-    topPadding: 0
+-    bottomPadding: 0
+-    leftPadding: Kirigami.Units.smallSpacing
+-    rightPadding: Kirigami.Units.smallSpacing
++    implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
++                            implicitContentWidth + leftPadding + rightPadding)
++    implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
++                             implicitContentHeight + topPadding + bottomPadding)
+ 
+-    implicitWidth: separator.width + controlRoot.leftPadding + controlRoot.rightPadding
+-    implicitHeight: parent.height
+-
+-    background: Kirigami.Separator {
+-        id: separator
+-        anchors {
+-            top: controlRoot.top
+-            bottom: controlRoot.bottom
+-            horizontalCenter: controlRoot.horizontalCenter
+-        }
++    contentItem: Kirigami.Separator {
++        // implicitHeight is the same as ToolBar implicitHeight minus ToolBar padding if not horizontal
++        implicitHeight: horizontal ? Math.floor(Kirigami.Units.devicePixelRatio) : 40 - (Kirigami.Units.smallSpacing * 2)
++        implicitWidth: horizontal ? 40 - (Kirigami.Units.smallSpacing * 2) : Math.floor(Kirigami.Units.devicePixelRatio)
+     }
+ }
+-- 
+GitLab
+