summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/musescore/files/musescore-4.4.0-fix-main-toolbar-and-menubar.patch')
-rw-r--r--media-sound/musescore/files/musescore-4.4.0-fix-main-toolbar-and-menubar.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/media-sound/musescore/files/musescore-4.4.0-fix-main-toolbar-and-menubar.patch b/media-sound/musescore/files/musescore-4.4.0-fix-main-toolbar-and-menubar.patch
new file mode 100644
index 000000000000..6abc9e4fbd95
--- /dev/null
+++ b/media-sound/musescore/files/musescore-4.4.0-fix-main-toolbar-and-menubar.patch
@@ -0,0 +1,38 @@
+From b274f13311ad0b2bce339634a006ba22fbd3379e Mon Sep 17 00:00:00 2001
+From: Ken Bloom <kbloom@gmail.com>
+Date: Fri, 30 Aug 2024 09:17:27 -0400
+Subject: [PATCH] Fix MainToolbar, and AppMenuBar in Qt 6.5+
+
+The problem was that a ListView lazily creates delegates as needed to
+actually display them. If the size of the ListView is 0, then it doesn't
+need to display anything, so it may not create any of the delegates. If
+it doesn't create any delegates, then we can't make it size itself to
+fit its contents. By setting a minimum size of 1, we force the ListView
+to create a delegate that we can then use to determine the ListView's
+actual size.
+
+Fixes: #24097
+--- a/src/appshell/qml/MainToolBar.qml
++++ b/src/appshell/qml/MainToolBar.qml
+@@ -70,8 +70,8 @@ Item {
+
+ model: toolBarModel
+
+- width: contentItem.childrenRect.width
+- height: contentItem.childrenRect.height
++ width: Math.max(1, contentItem.childrenRect.width)
++ height: Math.max(1, contentItem.childrenRect.height)
+
+ delegate: PageTabButton {
+ id: radioButtonDelegate
+--- a/src/appshell/qml/platform/AppMenuBar.qml
++++ b/src/appshell/qml/platform/AppMenuBar.qml
+@@ -28,7 +28,7 @@ import MuseScore.AppShell 1.0
+ ListView {
+ id: root
+
+- height: contentItem.childrenRect.height
++ height: Math.max(1,contentItem.childrenRect.height)
+ width: contentWidth
+
+ property alias appWindow: appMenuModel.appWindow