Skip to content

Commit d079915

Browse files
committed
[musescore-git] update patch
1 parent c942c61 commit d079915

6 files changed

Lines changed: 107 additions & 71 deletions

File tree

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,24 @@
1-
From 90d97c45dc3f53db32e5e04e0e1f8769d1669c9c Mon Sep 17 00:00:00 2001
1+
From f1f76f26f235b0ec4ab8eb63a37bcd75475435ef Mon Sep 17 00:00:00 2001
22
From: Yichao Yu <yyc1992@gmail.com>
33
Date: Wed, 13 Jul 2022 09:08:18 -0400
44
Subject: [PATCH] Do not force fusion style
55

66
---
7-
src/app/main.cpp | 1 -
8-
src/framework/ui/api/themeapi.cpp | 10 +++++++++-
9-
2 files changed, 9 insertions(+), 2 deletions(-)
7+
src/app/main.cpp | 1 -
8+
1 file changed, 1 deletion(-)
109

1110
diff --git a/src/app/main.cpp b/src/app/main.cpp
12-
index acc4ad4146..1b446f5ec4 100644
11+
index 32651d6430..b4fc503b50 100644
1312
--- a/src/app/main.cpp
1413
+++ b/src/app/main.cpp
15-
@@ -90,7 +90,6 @@ int main(int argc, char** argv)
14+
@@ -87,7 +87,6 @@ int main(int argc, char** argv)
1615

1716
app_init_qrc();
1817

1918
- qputenv("QT_STYLE_OVERRIDE", "Fusion");
2019
qputenv("QML_DISABLE_DISK_CACHE", "true");
2120

22-
#ifdef Q_OS_LINUX
23-
diff --git a/src/framework/ui/api/themeapi.cpp b/src/framework/ui/api/themeapi.cpp
24-
index 380c372a4f..b980ee2b37 100644
25-
--- a/src/framework/ui/api/themeapi.cpp
26-
+++ b/src/framework/ui/api/themeapi.cpp
27-
@@ -502,8 +502,16 @@ void ThemeApi::notifyAboutThemeChanged()
28-
// QStyle
29-
// ====================================================
30-
31-
+static QString _get_style_name()
32-
+{
33-
+ auto style = QApplication::style();
34-
+ if (style)
35-
+ return style->objectName();
36-
+ return "Fusion";
37-
+}
38-
+
39-
ProxyStyle::ProxyStyle(ThemeApi* t)
40-
- : QProxyStyle(QStyleFactory::create("Fusion")), m_theme(t)
41-
+ : QProxyStyle(QStyleFactory::create(_get_style_name())), m_theme(t)
42-
{
43-
}
44-
21+
// HACK: Workaround for crash #28840. This disables the incremental GC
4522
--
46-
2.45.2
23+
2.53.0
4724

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 9e2174b0676afa4a91104aa575dad2b058208939 Mon Sep 17 00:00:00 2001
2+
From: Yichao Yu <yyc1992@gmail.com>
3+
Date: Mon, 3 Aug 2026 14:55:15 -0400
4+
Subject: [PATCH] [framework] Do not hard code Fusion style
5+
6+
---
7+
framework/ui/view/widgetstyle.cpp | 10 +++++++++-
8+
1 file changed, 9 insertions(+), 1 deletion(-)
9+
10+
diff --git a/framework/ui/view/widgetstyle.cpp b/framework/ui/view/widgetstyle.cpp
11+
index e4e4f7848..a597a27ea 100644
12+
--- a/framework/ui/view/widgetstyle.cpp
13+
+++ b/framework/ui/view/widgetstyle.cpp
14+
@@ -86,8 +86,16 @@ static void drawRoundedRect(QPainter* painter, const QRectF& rect, const qreal r
15+
painter->restore();
16+
}
17+
18+
+static QString _get_style_name()
19+
+{
20+
+ auto style = QApplication::style();
21+
+ if (style)
22+
+ return style->objectName();
23+
+ return "Fusion";
24+
+}
25+
+
26+
WidgetStyle::WidgetStyle(std::shared_ptr<ThemeApi> t)
27+
- : QProxyStyle(QStyleFactory::create("Fusion")), m_theme(t)
28+
+ : QProxyStyle(QStyleFactory::create(_get_style_name())), m_theme(t)
29+
{
30+
}
31+
32+
--
33+
2.53.0
34+

alarmcn/musescore-git/PKGBUILD

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
pkgname=musescore-git
66
_realver=2.0.4
7-
pkgver=47336.dbaa95a6fc
7+
pkgver=47386.5f17e01be98
88
pkgrel=1
99
epoch=1
1010
pkgdesc="A music score editor - git-version"
@@ -21,10 +21,12 @@ provides=("musescore=${_realver}" 'musescore-svn')
2121
replaces=('musescore-svn')
2222
source=('git+https://github.com/musescore/MuseScore.git'
2323
'mime.xml'
24-
'0001-Do-not-force-fusion-style.patch')
25-
md5sums=('SKIP'
26-
'969696178e56de36f9af37d7da61baaa'
27-
'855e0c1c5394bbe15273ba61fd8a6501')
24+
'0001-Do-not-force-fusion-style.patch'
25+
'0001-framework-Do-not-hard-code-Fusion-style.patch')
26+
sha256sums=('SKIP'
27+
'85304aa6d5847542a7d31c010e82abda3872c471a625b64471e4e33a0b43b39d'
28+
'53662b02251dfb275fa0abcc37816ee0a21c7a301f5ba5c71f2b3dbe139853d7'
29+
'44d320ba802b0bb731eb13d0f9393f14dbdae8c3f3a0341c4c625cfdc2d03f18')
2830
options=(strip debug)
2931

3032
pkgver() {
@@ -39,7 +41,12 @@ prepare() {
3941
# Upstream add hard coded Fusion theme and they refuse to change it.
4042
patch -Np1 < ../0001-Do-not-force-fusion-style.patch
4143

42-
(cd src/framework/audio
44+
(
45+
cd muse
46+
patch -Np1 < ../../0001-framework-Do-not-hard-code-Fusion-style.patch
47+
)
48+
49+
(cd muse/framework/audio
4350
rm -rf thirdparty/lame/*/
4451
cat > thirdparty/lame/CMakeLists.txt <<EOF
4552
add_library(lame INTERFACE)
Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,24 @@
1-
From 90d97c45dc3f53db32e5e04e0e1f8769d1669c9c Mon Sep 17 00:00:00 2001
1+
From f1f76f26f235b0ec4ab8eb63a37bcd75475435ef Mon Sep 17 00:00:00 2001
22
From: Yichao Yu <yyc1992@gmail.com>
33
Date: Wed, 13 Jul 2022 09:08:18 -0400
44
Subject: [PATCH] Do not force fusion style
55

66
---
7-
src/app/main.cpp | 1 -
8-
src/framework/ui/api/themeapi.cpp | 10 +++++++++-
9-
2 files changed, 9 insertions(+), 2 deletions(-)
7+
src/app/main.cpp | 1 -
8+
1 file changed, 1 deletion(-)
109

1110
diff --git a/src/app/main.cpp b/src/app/main.cpp
12-
index acc4ad4146..1b446f5ec4 100644
11+
index 32651d6430..b4fc503b50 100644
1312
--- a/src/app/main.cpp
1413
+++ b/src/app/main.cpp
15-
@@ -90,7 +90,6 @@ int main(int argc, char** argv)
14+
@@ -87,7 +87,6 @@ int main(int argc, char** argv)
1615

1716
app_init_qrc();
1817

1918
- qputenv("QT_STYLE_OVERRIDE", "Fusion");
2019
qputenv("QML_DISABLE_DISK_CACHE", "true");
2120

22-
#ifdef Q_OS_LINUX
23-
diff --git a/src/framework/ui/api/themeapi.cpp b/src/framework/ui/api/themeapi.cpp
24-
index 380c372a4f..b980ee2b37 100644
25-
--- a/src/framework/ui/api/themeapi.cpp
26-
+++ b/src/framework/ui/api/themeapi.cpp
27-
@@ -502,8 +502,16 @@ void ThemeApi::notifyAboutThemeChanged()
28-
// QStyle
29-
// ====================================================
30-
31-
+static QString _get_style_name()
32-
+{
33-
+ auto style = QApplication::style();
34-
+ if (style)
35-
+ return style->objectName();
36-
+ return "Fusion";
37-
+}
38-
+
39-
ProxyStyle::ProxyStyle(ThemeApi* t)
40-
- : QProxyStyle(QStyleFactory::create("Fusion")), m_theme(t)
41-
+ : QProxyStyle(QStyleFactory::create(_get_style_name())), m_theme(t)
42-
{
43-
}
44-
21+
// HACK: Workaround for crash #28840. This disables the incremental GC
4522
--
46-
2.45.2
23+
2.53.0
4724

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 9e2174b0676afa4a91104aa575dad2b058208939 Mon Sep 17 00:00:00 2001
2+
From: Yichao Yu <yyc1992@gmail.com>
3+
Date: Mon, 3 Aug 2026 14:55:15 -0400
4+
Subject: [PATCH] [framework] Do not hard code Fusion style
5+
6+
---
7+
framework/ui/view/widgetstyle.cpp | 10 +++++++++-
8+
1 file changed, 9 insertions(+), 1 deletion(-)
9+
10+
diff --git a/framework/ui/view/widgetstyle.cpp b/framework/ui/view/widgetstyle.cpp
11+
index e4e4f7848..a597a27ea 100644
12+
--- a/framework/ui/view/widgetstyle.cpp
13+
+++ b/framework/ui/view/widgetstyle.cpp
14+
@@ -86,8 +86,16 @@ static void drawRoundedRect(QPainter* painter, const QRectF& rect, const qreal r
15+
painter->restore();
16+
}
17+
18+
+static QString _get_style_name()
19+
+{
20+
+ auto style = QApplication::style();
21+
+ if (style)
22+
+ return style->objectName();
23+
+ return "Fusion";
24+
+}
25+
+
26+
WidgetStyle::WidgetStyle(std::shared_ptr<ThemeApi> t)
27+
- : QProxyStyle(QStyleFactory::create("Fusion")), m_theme(t)
28+
+ : QProxyStyle(QStyleFactory::create(_get_style_name())), m_theme(t)
29+
{
30+
}
31+
32+
--
33+
2.53.0
34+

archlinuxcn/musescore-git/PKGBUILD

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ provides=("musescore=${_realver}" 'musescore-svn')
2121
replaces=('musescore-svn')
2222
source=('git+https://github.com/musescore/MuseScore.git'
2323
'mime.xml'
24-
'0001-Do-not-force-fusion-style.patch')
25-
md5sums=('SKIP'
26-
'969696178e56de36f9af37d7da61baaa'
27-
'855e0c1c5394bbe15273ba61fd8a6501')
24+
'0001-Do-not-force-fusion-style.patch'
25+
'0001-framework-Do-not-hard-code-Fusion-style.patch')
26+
sha256sums=('SKIP'
27+
'85304aa6d5847542a7d31c010e82abda3872c471a625b64471e4e33a0b43b39d'
28+
'53662b02251dfb275fa0abcc37816ee0a21c7a301f5ba5c71f2b3dbe139853d7'
29+
'44d320ba802b0bb731eb13d0f9393f14dbdae8c3f3a0341c4c625cfdc2d03f18')
2830
options=(strip debug)
2931

3032
pkgver() {
@@ -39,7 +41,12 @@ prepare() {
3941
# Upstream add hard coded Fusion theme and they refuse to change it.
4042
patch -Np1 < ../0001-Do-not-force-fusion-style.patch
4143

42-
(cd src/framework/audio
44+
(
45+
cd muse
46+
patch -Np1 < ../../0001-framework-Do-not-hard-code-Fusion-style.patch
47+
)
48+
49+
(cd muse/framework/audio
4350
rm -rf thirdparty/lame/*/
4451
cat > thirdparty/lame/CMakeLists.txt <<EOF
4552
add_library(lame INTERFACE)

0 commit comments

Comments
 (0)