From 50c9adbf88ebe019974635d9650467324e5233da Mon Sep 17 00:00:00 2001 From: Abhay-Varnekar Date: Sat, 7 Dec 2024 22:37:37 +0530 Subject: [PATCH 1/2] Disabled the unecessary hover state of the dropdown Co-Authored-By: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com> --- .../uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml b/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml index 047ef80f26a1c..6420e609f1507 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml @@ -81,6 +81,7 @@ Item { MouseArea { id: mouseAreaItem anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: root.clicked() From 0026608d0bad44c7330ca7aeb3263674d6ce1b05 Mon Sep 17 00:00:00 2001 From: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:24:03 +0100 Subject: [PATCH 2/2] Disable hover state for all disabled UI elements --- src/appshell/qml/shared/internal/ThemeSample.qml | 3 +++ .../qml/Muse/Diagnostics/DiagnosticNavigationPanel.qml | 1 + .../extensions/qml/Muse/Extensions/internal/ExtensionItem.qml | 1 + src/framework/learn/qml/Muse/Learn/internal/PlaylistItem.qml | 2 +- .../mpe/qml/Muse/Mpe/ArticulationPatternSegmentsList.qml | 1 + src/framework/mpe/qml/Muse/Mpe/ArticulationPatternsList.qml | 1 + .../uicomponents/qml/Muse/UiComponents/ColorPicker.qml | 4 +++- .../qml/Muse/UiComponents/ExpandableBlankSection.qml | 2 +- .../uicomponents/qml/Muse/UiComponents/FlatButton.qml | 1 + .../uicomponents/qml/Muse/UiComponents/FlatRadioButton.qml | 3 ++- .../uicomponents/qml/Muse/UiComponents/FlatToggleButton.qml | 2 ++ .../uicomponents/qml/Muse/UiComponents/ListItemBlank.qml | 3 ++- .../uicomponents/qml/Muse/UiComponents/NumberInputField.qml | 4 +--- .../uicomponents/qml/Muse/UiComponents/RoundedRadioButton.qml | 2 +- .../uicomponents/qml/Muse/UiComponents/StyledSlider.qml | 2 +- .../uicomponents/qml/Muse/UiComponents/TextInputArea.qml | 2 +- .../uicomponents/qml/Muse/UiComponents/TextInputField.qml | 1 + .../uicomponents/qml/Muse/UiComponents/ToggleButton.qml | 1 + .../uicomponents/qml/Muse/UiComponents/ValueAdjustControl.qml | 2 ++ .../qml/Muse/UiComponents/internal/DropdownItem.qml | 2 ++ .../qml/Muse/UiComponents/internal/ValueListHeaderItem.qml | 2 ++ .../NotationScene/internal/PercussionPanelPadContent.qml | 3 ++- .../qml/MuseScore/Playback/internal/AudioResourceControl.qml | 3 ++- .../qml/MuseScore/Playback/internal/MixerTitleSection.qml | 1 + .../Project/internal/ScoresPage/CloudScoreIndicatorButton.qml | 1 + .../MuseScore/Project/internal/ScoresPage/ScoreGridItem.qml | 2 +- 26 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/appshell/qml/shared/internal/ThemeSample.qml b/src/appshell/qml/shared/internal/ThemeSample.qml index ebb79bec0ddfe..eefc61e4fbbac 100644 --- a/src/appshell/qml/shared/internal/ThemeSample.qml +++ b/src/appshell/qml/shared/internal/ThemeSample.qml @@ -135,7 +135,10 @@ Rectangle { MouseArea { id: mouseArea anchors.fill: parent + + enabled: root.enabled hoverEnabled: true + onClicked: root.clicked() } } diff --git a/src/framework/diagnostics/qml/Muse/Diagnostics/DiagnosticNavigationPanel.qml b/src/framework/diagnostics/qml/Muse/Diagnostics/DiagnosticNavigationPanel.qml index 03b8066355c8a..a302805a4a71d 100644 --- a/src/framework/diagnostics/qml/Muse/Diagnostics/DiagnosticNavigationPanel.qml +++ b/src/framework/diagnostics/qml/Muse/Diagnostics/DiagnosticNavigationPanel.qml @@ -210,6 +210,7 @@ Rectangle { MouseArea { anchors.fill: parent + enabled: gridItem.enabled hoverEnabled: true onContainsMouseChanged: { if (containsMouse) { diff --git a/src/framework/extensions/qml/Muse/Extensions/internal/ExtensionItem.qml b/src/framework/extensions/qml/Muse/Extensions/internal/ExtensionItem.qml index 111d339a022b7..f97a820d4328d 100644 --- a/src/framework/extensions/qml/Muse/Extensions/internal/ExtensionItem.qml +++ b/src/framework/extensions/qml/Muse/Extensions/internal/ExtensionItem.qml @@ -135,6 +135,7 @@ Item { id: mouseArea anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: { diff --git a/src/framework/learn/qml/Muse/Learn/internal/PlaylistItem.qml b/src/framework/learn/qml/Muse/Learn/internal/PlaylistItem.qml index 6e193b6d6460f..caee884ba89ae 100644 --- a/src/framework/learn/qml/Muse/Learn/internal/PlaylistItem.qml +++ b/src/framework/learn/qml/Muse/Learn/internal/PlaylistItem.qml @@ -168,9 +168,9 @@ FocusScope { MouseArea { id: mouseArea - anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: { diff --git a/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternSegmentsList.qml b/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternSegmentsList.qml index f933b0278a203..940a4af8b9545 100644 --- a/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternSegmentsList.qml +++ b/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternSegmentsList.qml @@ -59,6 +59,7 @@ ListView { id: thumbnailMouseArea anchors.fill: parent + enabled: thumbnailPlot.enabled hoverEnabled: true onClicked: { diff --git a/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternsList.qml b/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternsList.qml index 5b9c979a52ce7..b71ca967ac3f6 100644 --- a/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternsList.qml +++ b/src/framework/mpe/qml/Muse/Mpe/ArticulationPatternsList.qml @@ -84,6 +84,7 @@ ListView { anchors.fill: label acceptedButtons: Qt.LeftButton | Qt.RightButton + enabled: label.enabled hoverEnabled: true onClicked: function(mouse) { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/ColorPicker.qml b/src/framework/uicomponents/qml/Muse/UiComponents/ColorPicker.qml index 69e88c34c5899..e7c0071c239e8 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/ColorPicker.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/ColorPicker.qml @@ -81,9 +81,11 @@ Rectangle { MouseArea { id: clickableArea - anchors.fill: parent + + enabled: root.enabled hoverEnabled: true + onClicked: { navigation.requestActiveByInteraction() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/ExpandableBlankSection.qml b/src/framework/uicomponents/qml/Muse/UiComponents/ExpandableBlankSection.qml index 3f457583dbba0..25e11bb968ca8 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/ExpandableBlankSection.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/ExpandableBlankSection.qml @@ -105,9 +105,9 @@ FocusScope { MouseArea { id: mouseArea - anchors.fill: expandSectionRow + enabled: root.enabled hoverEnabled: true onClicked: { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/FlatButton.qml b/src/framework/uicomponents/qml/Muse/UiComponents/FlatButton.qml index dfc039ebfcb9c..f030e5701cab8 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/FlatButton.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/FlatButton.qml @@ -296,6 +296,7 @@ FocusScope { id: mouseArea anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: function(mouse) { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/FlatRadioButton.qml b/src/framework/uicomponents/qml/Muse/UiComponents/FlatRadioButton.qml index dcd8be707eff9..de85c17b93d52 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/FlatRadioButton.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/FlatRadioButton.qml @@ -55,7 +55,8 @@ RadioDelegate { implicitHeight: ListView.view ? ListView.view.height : ui.theme.defaultButtonSize implicitWidth: ListView.view ? (ListView.view.width - (ListView.view.spacing * (ListView.view.count - 1))) / ListView.view.count : ui.theme.defaultButtonSize - hoverEnabled: true + + hoverEnabled: root.enabled onClicked: { navigation.requestActiveByInteraction() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/FlatToggleButton.qml b/src/framework/uicomponents/qml/Muse/UiComponents/FlatToggleButton.qml index d447aaefe8b85..5a77a48a50db0 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/FlatToggleButton.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/FlatToggleButton.qml @@ -82,7 +82,9 @@ FocusScope { id: mouseArea anchors.fill: parent + enabled: root.enabled hoverEnabled: true + onClicked: { navigation.requestActiveByInteraction() root.toggled() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/ListItemBlank.qml b/src/framework/uicomponents/qml/Muse/UiComponents/ListItemBlank.qml index b64e5277be104..aa84dc75f2fc0 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/ListItemBlank.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/ListItemBlank.qml @@ -59,7 +59,8 @@ FocusableControl { focusBorder.drawOutsideParent: false - mouseArea.hoverEnabled: root.visible + mouseArea.enabled: root.visible && root.enabled + mouseArea.hoverEnabled: true mouseArea.onHoveredChanged: root.hovered(mouseArea.containsMouse, mouseArea.mouseX, mouseArea.mouseY) mouseArea.onClicked: function(mouse) { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/NumberInputField.qml b/src/framework/uicomponents/qml/Muse/UiComponents/NumberInputField.qml index 4b272b637fd73..650c79c6f4d9f 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/NumberInputField.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/NumberInputField.qml @@ -182,12 +182,10 @@ FocusScope { MouseArea { id: mouseArea - anchors.fill: parent - hoverEnabled: true - enabled: !textField.readOnly + hoverEnabled: true onPressed: { navigation.requestActiveByInteraction() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/RoundedRadioButton.qml b/src/framework/uicomponents/qml/Muse/UiComponents/RoundedRadioButton.qml index 1f833054f711f..9ac7930903133 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/RoundedRadioButton.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/RoundedRadioButton.qml @@ -42,7 +42,7 @@ RadioDelegate { font: ui.theme.bodyFont - hoverEnabled: true + hoverEnabled: root.enabled onToggled: { navigation.requestActiveByInteraction() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/StyledSlider.qml b/src/framework/uicomponents/qml/Muse/UiComponents/StyledSlider.qml index 847ff01df34da..de55d468ddaf6 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/StyledSlider.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/StyledSlider.qml @@ -32,7 +32,7 @@ Slider { implicitWidth: vertical ? prv.handleSize : prv.defaultLength implicitHeight: vertical ? prv.defaultLength : prv.handleSize - hoverEnabled: true + hoverEnabled: root.enabled wheelEnabled: true QtObject { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/TextInputArea.qml b/src/framework/uicomponents/qml/Muse/UiComponents/TextInputArea.qml index 0425511e5b8dd..0645f85703142 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/TextInputArea.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/TextInputArea.qml @@ -226,9 +226,9 @@ FocusScope { MouseArea { id: clickableArea - anchors.fill: parent + enabled: root.enabled propagateComposedEvents: true hoverEnabled: true cursorShape: Qt.IBeamCursor diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/TextInputField.qml b/src/framework/uicomponents/qml/Muse/UiComponents/TextInputField.qml index 47d56e18551c1..c4c2d8720c415 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/TextInputField.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/TextInputField.qml @@ -319,6 +319,7 @@ FocusScope { height: parent.height width: clearTextButtonItem.visible ? parent.width - clearTextButtonItem.width : parent.width + enabled: root.enabled propagateComposedEvents: true hoverEnabled: true cursorShape: root.readOnly ? Qt.ArrowCursor : Qt.IBeamCursor diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/ToggleButton.qml b/src/framework/uicomponents/qml/Muse/UiComponents/ToggleButton.qml index 930d3a0d38402..39c889300b16a 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/ToggleButton.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/ToggleButton.qml @@ -100,6 +100,7 @@ FocusScope { id: mouseArea anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: { navigation.requestActiveByInteraction() diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/ValueAdjustControl.qml b/src/framework/uicomponents/qml/Muse/UiComponents/ValueAdjustControl.qml index d203391806ad4..c2dead4c5f085 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/ValueAdjustControl.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/ValueAdjustControl.qml @@ -65,6 +65,7 @@ Column { id: increaseMouseArea anchors.fill: parent + enabled: increaseButton.enabled hoverEnabled: true preventStealing: true @@ -130,6 +131,7 @@ Column { id: decreaseMouseArea anchors.fill: parent + enabled: decreaseButton.enabled hoverEnabled: true preventStealing: true diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml b/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml index 6420e609f1507..7c45e902e3c21 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/internal/DropdownItem.qml @@ -81,8 +81,10 @@ Item { MouseArea { id: mouseAreaItem anchors.fill: parent + enabled: root.enabled hoverEnabled: true + onClicked: root.clicked() onContainsMouseChanged: { diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/internal/ValueListHeaderItem.qml b/src/framework/uicomponents/qml/Muse/UiComponents/internal/ValueListHeaderItem.qml index 0edb2181ff716..30a326a84946f 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/internal/ValueListHeaderItem.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/internal/ValueListHeaderItem.qml @@ -102,6 +102,8 @@ Item { MouseArea { id: mouseArea anchors.fill: parent + + enabled: root.enabled hoverEnabled: true onClicked: { diff --git a/src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPadContent.qml b/src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPadContent.qml index 5f64099c6ff8c..164509d4a18c5 100644 --- a/src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPadContent.qml +++ b/src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPadContent.qml @@ -52,8 +52,9 @@ Column { MouseArea { id: mouseArea - anchors.fill: parent + + enabled: mainContentArea.enabled hoverEnabled: true onPressed: { diff --git a/src/playback/qml/MuseScore/Playback/internal/AudioResourceControl.qml b/src/playback/qml/MuseScore/Playback/internal/AudioResourceControl.qml index 34379ece7f167..7378e90c6d74e 100644 --- a/src/playback/qml/MuseScore/Playback/internal/AudioResourceControl.qml +++ b/src/playback/qml/MuseScore/Playback/internal/AudioResourceControl.qml @@ -368,8 +368,9 @@ Item { MouseArea { id: rootMouseArea - anchors.fill: parent + + enabled: parent.enabled acceptedButtons: Qt.NoButton hoverEnabled: true } diff --git a/src/playback/qml/MuseScore/Playback/internal/MixerTitleSection.qml b/src/playback/qml/MuseScore/Playback/internal/MixerTitleSection.qml index f4c45a23e762b..29f4d6b2cca97 100644 --- a/src/playback/qml/MuseScore/Playback/internal/MixerTitleSection.qml +++ b/src/playback/qml/MuseScore/Playback/internal/MixerTitleSection.qml @@ -79,6 +79,7 @@ MixerPanelSection { id: mouseArea anchors.fill: parent + enabled: parent.enabled hoverEnabled: true onContainsMouseChanged: { diff --git a/src/project/qml/MuseScore/Project/internal/ScoresPage/CloudScoreIndicatorButton.qml b/src/project/qml/MuseScore/Project/internal/ScoresPage/CloudScoreIndicatorButton.qml index 847004bd86333..45ce94414fb0b 100644 --- a/src/project/qml/MuseScore/Project/internal/ScoresPage/CloudScoreIndicatorButton.qml +++ b/src/project/qml/MuseScore/Project/internal/ScoresPage/CloudScoreIndicatorButton.qml @@ -154,6 +154,7 @@ Item { id: mouseArea anchors.fill: root + enabled: root.enabled hoverEnabled: true onContainsMouseChanged: { diff --git a/src/project/qml/MuseScore/Project/internal/ScoresPage/ScoreGridItem.qml b/src/project/qml/MuseScore/Project/internal/ScoresPage/ScoreGridItem.qml index 947574285148d..c2268604759cd 100644 --- a/src/project/qml/MuseScore/Project/internal/ScoresPage/ScoreGridItem.qml +++ b/src/project/qml/MuseScore/Project/internal/ScoresPage/ScoreGridItem.qml @@ -63,9 +63,9 @@ FocusScope { MouseArea { id: mouseArea - anchors.fill: parent + enabled: root.enabled hoverEnabled: true onClicked: {