aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml22
1 files changed, 15 insertions, 7 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml
index 74869c386c..908f2274e6 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml
@@ -46,12 +46,16 @@ Rectangle {
implicitHeight: StudioTheme.Values.height
signal clicked
+ z: 10
T.Label {
id: actionIndicatorIcon
anchors.fill: parent
text: StudioTheme.Constants.actionIcon
- visible: text != StudioTheme.Constants.actionIcon || actionIndicator.forceVisible
+ visible: text !== StudioTheme.Constants.actionIcon || actionIndicator.forceVisible
+ || (myControl !== undefined &&
+ ((myControl.edit !== undefined && myControl.edit)
+ || (myControl.hover !== undefined && myControl.hover)))
color: StudioTheme.Values.themeTextColor
font.family: StudioTheme.Constants.iconFont.family
font.pixelSize: StudioTheme.Values.myIconFontSize
@@ -92,7 +96,7 @@ Rectangle {
states: [
State {
name: "default"
- when: myControl.enabled && !actionIndicator.hover
+ when: myControl !== undefined && myControl.enabled && !actionIndicator.hover
&& !actionIndicator.pressed && !myControl.hover
&& !myControl.edit && !myControl.drag && actionIndicator.showBackground
PropertyChanges {
@@ -103,18 +107,21 @@ Rectangle {
},
State {
name: "globalHover"
- when: myControl.hover && !actionIndicator.hover
- && !actionIndicator.pressed && !myControl.edit
+ when: myControl !== undefined && myControl.hover !== undefined
+ && myControl.hover && !actionIndicator.hover && !actionIndicator.pressed
+ && myControl.edit !== undefined && !myControl.edit && myControl.drag !== undefined
&& !myControl.drag && actionIndicator.showBackground
PropertyChanges {
target: actionIndicator
color: StudioTheme.Values.themeHoverHighlight
border.color: StudioTheme.Values.themeControlOutline
}
+
},
State {
name: "edit"
- when: myControl.edit && actionIndicator.showBackground
+ when: myControl !== undefined && myControl.edit !== undefined
+ && myControl.edit && actionIndicator.showBackground
PropertyChanges {
target: actionIndicator
color: StudioTheme.Values.themeFocusEdit
@@ -123,7 +130,8 @@ Rectangle {
},
State {
name: "drag"
- when: myControl.drag && actionIndicator.showBackground
+ when: myControl !== undefined && myControl.drag !== undefined
+ && myControl.drag && actionIndicator.showBackground
PropertyChanges {
target: actionIndicator
color: StudioTheme.Values.themeFocusDrag
@@ -132,7 +140,7 @@ Rectangle {
},
State {
name: "disabled"
- when: !myControl.enabled && actionIndicator.showBackground
+ when: myControl !== undefined && !myControl.enabled && actionIndicator.showBackground
PropertyChanges {
target: actionIndicator
color: StudioTheme.Values.themeControlBackgroundDisabled