forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Hide action indidactors on controls
Task-number: QDS-1688 Change-Id: Ia96a8d5229b42d9ac0be75273cadfc35b5cef334 Reviewed-by: Brook Cronin <brook.cronin@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
20e95f2f19
commit
1290e07819
@@ -140,7 +140,7 @@ SectionLayout {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
actionIndicator.visible: true
|
actionIndicator.visible: true
|
||||||
|
|
||||||
labelColor: horizontalAlignmentComboBox.currentIndex === 0 ? colorLogic.__defaultTextColor : colorLogic.__changedTextColor
|
labelColor: horizontalAlignmentComboBox.currentIndex === 0 ? colorLogic.__defaultTextColor : colorLogic.__changedTextColor
|
||||||
@@ -176,7 +176,7 @@ SectionLayout {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
actionIndicator.visible: true
|
actionIndicator.visible: true
|
||||||
|
|
||||||
labelColor: verticalAlignmentComboBox.currentIndex === 0 ? colorLogic.__defaultTextColor : colorLogic.__changedTextColor
|
labelColor: verticalAlignmentComboBox.currentIndex === 0 ? colorLogic.__defaultTextColor : colorLogic.__changedTextColor
|
||||||
|
@@ -93,6 +93,7 @@ Row {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
StudioControls.ButtonGroup {
|
StudioControls.ButtonGroup {
|
||||||
id: group
|
id: group
|
||||||
|
@@ -93,6 +93,7 @@ Row {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
StudioControls.ButtonGroup {
|
StudioControls.ButtonGroup {
|
||||||
id: group
|
id: group
|
||||||
|
@@ -87,4 +87,5 @@ StudioControls.Button {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,7 @@ StudioControls.CheckBox {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
labelColor: colorLogic.textColor
|
labelColor: colorLogic.textColor
|
||||||
ColorLogic {
|
ColorLogic {
|
||||||
|
@@ -57,6 +57,7 @@ StudioControls.ComboBox {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
actionIndicator.visible: comboBox.showExtendedFunctionButton
|
actionIndicator.visible: comboBox.showExtendedFunctionButton
|
||||||
|
|
||||||
|
@@ -42,6 +42,8 @@ Item {
|
|||||||
|
|
||||||
signal reseted
|
signal reseted
|
||||||
|
|
||||||
|
property bool menuVisible: false
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
menuLoader.show()
|
menuLoader.show()
|
||||||
}
|
}
|
||||||
@@ -97,6 +99,10 @@ Item {
|
|||||||
onAboutToShow: {
|
onAboutToShow: {
|
||||||
exportMenuItem.checked = backendValue.hasPropertyAlias()
|
exportMenuItem.checked = backendValue.hasPropertyAlias()
|
||||||
exportMenuItem.enabled = !backendValue.isAttachedProperty()
|
exportMenuItem.enabled = !backendValue.isAttachedProperty()
|
||||||
|
extendedFunctionButton.menuVisible = true
|
||||||
|
}
|
||||||
|
onAboutToHide: {
|
||||||
|
extendedFunctionButton.menuVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.MenuItem {
|
StudioControls.MenuItem {
|
||||||
|
@@ -81,6 +81,7 @@ StudioControls.ComboBox {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
property bool showExtendedFunctionButton: true
|
property bool showExtendedFunctionButton: true
|
||||||
|
|
||||||
|
@@ -70,6 +70,7 @@ StudioControls.TextField {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
ColorLogic {
|
ColorLogic {
|
||||||
id: colorLogic
|
id: colorLogic
|
||||||
|
@@ -84,6 +84,8 @@ Item {
|
|||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
ColorLogic {
|
ColorLogic {
|
||||||
id: colorLogic
|
id: colorLogic
|
||||||
backendValue: spinBox.backendValue
|
backendValue: spinBox.backendValue
|
||||||
|
@@ -53,6 +53,7 @@ RowLayout {
|
|||||||
actionIndicator.icon.color: extFuncLogic.color
|
actionIndicator.icon.color: extFuncLogic.color
|
||||||
actionIndicator.icon.text: extFuncLogic.glyph
|
actionIndicator.icon.text: extFuncLogic.glyph
|
||||||
actionIndicator.onClicked: extFuncLogic.show()
|
actionIndicator.onClicked: extFuncLogic.show()
|
||||||
|
actionIndicator.forceVisible: extFuncLogic.menuVisible
|
||||||
|
|
||||||
ExtendedFunctionLogic {
|
ExtendedFunctionLogic {
|
||||||
id: extFuncLogic
|
id: extFuncLogic
|
||||||
|
@@ -37,6 +37,7 @@ Rectangle {
|
|||||||
|
|
||||||
property bool hover: false
|
property bool hover: false
|
||||||
property bool pressed: false
|
property bool pressed: false
|
||||||
|
property bool forceVisible: false
|
||||||
|
|
||||||
color: actionIndicator.showBackground ? StudioTheme.Values.themeControlBackground : "transparent"
|
color: actionIndicator.showBackground ? StudioTheme.Values.themeControlBackground : "transparent"
|
||||||
border.color: actionIndicator.showBackground ? StudioTheme.Values.themeControlOutline : "transparent"
|
border.color: actionIndicator.showBackground ? StudioTheme.Values.themeControlOutline : "transparent"
|
||||||
@@ -50,6 +51,7 @@ Rectangle {
|
|||||||
id: actionIndicatorIcon
|
id: actionIndicatorIcon
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: StudioTheme.Constants.actionIcon
|
text: StudioTheme.Constants.actionIcon
|
||||||
|
visible: text != StudioTheme.Constants.actionIcon || actionIndicator.forceVisible
|
||||||
color: StudioTheme.Values.themeTextColor
|
color: StudioTheme.Values.themeTextColor
|
||||||
font.family: StudioTheme.Constants.iconFont.family
|
font.family: StudioTheme.Constants.iconFont.family
|
||||||
font.pixelSize: StudioTheme.Values.myIconFontSize
|
font.pixelSize: StudioTheme.Values.myIconFontSize
|
||||||
@@ -65,6 +67,7 @@ Rectangle {
|
|||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: actionIndicatorIcon
|
target: actionIndicatorIcon
|
||||||
scale: 1.2
|
scale: 1.2
|
||||||
|
visible: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
|
Reference in New Issue
Block a user