Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable hover state for all disabled UI elements #25910

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/appshell/qml/shared/internal/ThemeSample.qml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ Rectangle {
MouseArea {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: root.clicked()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Rectangle {
MouseArea {
anchors.fill: parent

enabled: gridItem.enabled
hoverEnabled: true
onContainsMouseChanged: {
if (containsMouse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Item {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ FocusScope {

MouseArea {
id: mouseArea

anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ListView {
id: thumbnailMouseArea

anchors.fill: parent
enabled: thumbnailPlot.enabled
hoverEnabled: true

onClicked: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ListView {
anchors.fill: label

acceptedButtons: Qt.LeftButton | Qt.RightButton
enabled: label.enabled
hoverEnabled: true

onClicked: function(mouse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ Rectangle {

MouseArea {
id: clickableArea

anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
navigation.requestActiveByInteraction()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ FocusScope {

MouseArea {
id: mouseArea

anchors.fill: expandSectionRow

enabled: root.enabled
hoverEnabled: true

onClicked: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ FocusScope {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: function(mouse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ FocusScope {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
navigation.requestActiveByInteraction()
root.toggled()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ FocusScope {

MouseArea {
id: mouseArea

anchors.fill: parent

hoverEnabled: true

enabled: !textField.readOnly
hoverEnabled: true

onPressed: {
navigation.requestActiveByInteraction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RadioDelegate {

font: ui.theme.bodyFont

hoverEnabled: true
hoverEnabled: root.enabled

onToggled: {
navigation.requestActiveByInteraction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ FocusScope {

MouseArea {
id: clickableArea

anchors.fill: parent

enabled: root.enabled
propagateComposedEvents: true
hoverEnabled: true
cursorShape: Qt.IBeamCursor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ FocusScope {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true
onClicked: {
navigation.requestActiveByInteraction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Column {
id: increaseMouseArea
anchors.fill: parent

enabled: increaseButton.enabled
hoverEnabled: true
preventStealing: true

Expand Down Expand Up @@ -130,6 +131,7 @@ Column {
id: decreaseMouseArea
anchors.fill: parent

enabled: decreaseButton.enabled
hoverEnabled: true
preventStealing: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ Item {
MouseArea {
id: mouseAreaItem
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: root.clicked()

onContainsMouseChanged: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Item {
MouseArea {
id: mouseArea
anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Column {

MouseArea {
id: mouseArea

anchors.fill: parent

enabled: mainContentArea.enabled
hoverEnabled: true

onPressed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ Item {

MouseArea {
id: rootMouseArea

anchors.fill: parent

enabled: parent.enabled
acceptedButtons: Qt.NoButton
hoverEnabled: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ MixerPanelSection {
id: mouseArea
anchors.fill: parent

enabled: parent.enabled
hoverEnabled: true

onContainsMouseChanged: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Item {
id: mouseArea
anchors.fill: root

enabled: root.enabled
hoverEnabled: true

onContainsMouseChanged: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ FocusScope {

MouseArea {
id: mouseArea

anchors.fill: parent

enabled: root.enabled
hoverEnabled: true

onClicked: {
Expand Down