From c4db44205ebf019debbf69165857bca829b7ca82 Mon Sep 17 00:00:00 2001 From: Eric Warren Date: Mon, 6 Oct 2025 20:13:56 -0600 Subject: [PATCH 1/2] style notationSwitchButton like DockPanelTab --- .../internal/NotationSwitchButton.qml | 33 +++++-------------- .../internal/NotationSwitchPanel.qml | 2 +- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml index a7f1bb072e3e9..3057ff4614b91 100644 --- a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml +++ b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml @@ -38,8 +38,10 @@ FlatRadioButton { signal closeRequested() + readonly property real actualHeight: 34 + implicitWidth: Math.min(200, implicitContentWidth) - implicitHeight: ListView.view.height + implicitHeight: actualHeight + 1 // For separator padding: 0 @@ -48,6 +50,7 @@ FlatRadioButton { spacing: 4 StyledTextLabel { + id: titleLabel Layout.alignment: Qt.AlignLeft Layout.fillWidth: root.implicitContentWidth > 200 Layout.preferredWidth: implicitWidth @@ -55,6 +58,7 @@ FlatRadioButton { horizontalAlignment: Text.AlignLeft + font: ui.theme.bodyFont text: (root.needSave ? "*" : "") + root.text } @@ -95,15 +99,6 @@ FlatRadioButton { color: ui.theme.backgroundSecondaryColor - Rectangle { - id: backgroundInner - anchors.fill: parent - - visible: false - color: "white" - opacity: 0.05 - } - NavigationFocusBorder { navigationCtrl: root.navigation drawOutsideParent: false @@ -145,12 +140,12 @@ FlatRadioButton { PropertyChanges { target: background - color: ui.theme.popupBackgroundColor + color: ui.theme.backgroundPrimaryColor } PropertyChanges { - target: backgroundInner - visible: true + target: titleLabel + font: ui.theme.bodyBoldFont } }, @@ -160,17 +155,7 @@ FlatRadioButton { PropertyChanges { target: background - color: Utils.colorWithAlpha(ui.theme.buttonColor, ui.theme.buttonOpacityHover) - } - }, - - State { - name: "PRESSED" - when: root.pressed - - PropertyChanges { - target: background - color: Utils.colorWithAlpha(ui.theme.buttonColor, ui.theme.buttonOpacityHit) + color: Utils.colorWithAlpha(ui.theme.backgroundPrimaryColor, ui.theme.buttonOpacityHover) } } ] diff --git a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchPanel.qml b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchPanel.qml index 0950dc911b140..5a62e073e01a4 100644 --- a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchPanel.qml +++ b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchPanel.qml @@ -30,7 +30,7 @@ import MuseScore.NotationScene 1.0 Rectangle { id: root - height: 26 + height: 34 visible: notationsView.count > 0 color: ui.theme.backgroundSecondaryColor From 6c1cc07f92ccbc4d2e5fd0688e72268e0efb2e15 Mon Sep 17 00:00:00 2001 From: Eric Warren Date: Mon, 6 Oct 2025 20:13:56 -0600 Subject: [PATCH 2/2] style score/part tabs like panels revert score/part tabs height --- .../internal/NotationSwitchButton.qml | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml index a7f1bb072e3e9..ce31ab164d016 100644 --- a/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml +++ b/src/notation/qml/MuseScore/NotationScene/internal/NotationSwitchButton.qml @@ -48,6 +48,7 @@ FlatRadioButton { spacing: 4 StyledTextLabel { + id: titleLabel Layout.alignment: Qt.AlignLeft Layout.fillWidth: root.implicitContentWidth > 200 Layout.preferredWidth: implicitWidth @@ -55,6 +56,7 @@ FlatRadioButton { horizontalAlignment: Text.AlignLeft + font: ui.theme.bodyFont text: (root.needSave ? "*" : "") + root.text } @@ -95,15 +97,6 @@ FlatRadioButton { color: ui.theme.backgroundSecondaryColor - Rectangle { - id: backgroundInner - anchors.fill: parent - - visible: false - color: "white" - opacity: 0.05 - } - NavigationFocusBorder { navigationCtrl: root.navigation drawOutsideParent: false @@ -145,12 +138,12 @@ FlatRadioButton { PropertyChanges { target: background - color: ui.theme.popupBackgroundColor + color: ui.theme.backgroundPrimaryColor } PropertyChanges { - target: backgroundInner - visible: true + target: titleLabel + font: ui.theme.bodyBoldFont } }, @@ -160,17 +153,7 @@ FlatRadioButton { PropertyChanges { target: background - color: Utils.colorWithAlpha(ui.theme.buttonColor, ui.theme.buttonOpacityHover) - } - }, - - State { - name: "PRESSED" - when: root.pressed - - PropertyChanges { - target: background - color: Utils.colorWithAlpha(ui.theme.buttonColor, ui.theme.buttonOpacityHit) + color: Utils.colorWithAlpha(ui.theme.backgroundPrimaryColor, ui.theme.buttonOpacityHover) } } ]