forked from qt-creator/qt-creator
QmlDesigner: Annotation Multiselect
Change-Id: Ia7a84c321d5cd1e2522bf277a903c78ec24ce156 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -146,6 +146,12 @@ Rectangle {
|
|||||||
tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.")
|
tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Item { //dummy object to preserve layout in case of multiselection
|
||||||
|
Layout.preferredWidth: 20
|
||||||
|
Layout.preferredHeight: 20
|
||||||
|
enabled: modelNodeBackend.multiSelection
|
||||||
|
visible: enabled
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -154,13 +160,11 @@ Rectangle {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
enabled: !modelNodeBackend.multiSelection
|
enabled: !modelNodeBackend.multiSelection
|
||||||
visible: enabled
|
|
||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: annotationEdit
|
id: annotationEdit
|
||||||
enabled: annotationEditor.hasAuxData
|
visible: annotationEditor.hasAuxData
|
||||||
visible: enabled
|
|
||||||
|
|
||||||
backendValue: backendValues.customId__AUX
|
backendValue: backendValues.customId__AUX
|
||||||
placeholderText: qsTr("customId")
|
placeholderText: qsTr("customId")
|
||||||
@@ -176,8 +180,8 @@ Rectangle {
|
|||||||
|
|
||||||
StudioControls.AbstractButton {
|
StudioControls.AbstractButton {
|
||||||
id: editAnnotationButton
|
id: editAnnotationButton
|
||||||
enabled: annotationEditor.hasAuxData
|
visible: annotationEditor.hasAuxData
|
||||||
visible: enabled
|
|
||||||
Layout.preferredWidth: 22
|
Layout.preferredWidth: 22
|
||||||
Layout.preferredHeight: 22
|
Layout.preferredHeight: 22
|
||||||
width: 22
|
width: 22
|
||||||
@@ -185,14 +189,13 @@ Rectangle {
|
|||||||
buttonIcon: StudioTheme.Constants.edit
|
buttonIcon: StudioTheme.Constants.edit
|
||||||
|
|
||||||
onClicked: annotationEditor.showWidget()
|
onClicked: annotationEditor.showWidget()
|
||||||
|
|
||||||
onHoveredChanged: annotationEditor.checkAux()
|
onHoveredChanged: annotationEditor.checkAux()
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
StudioControls.AbstractButton {
|
||||||
id: removeAnnotationButton
|
id: removeAnnotationButton
|
||||||
enabled: annotationEditor.hasAuxData
|
visible: annotationEditor.hasAuxData
|
||||||
visible: enabled
|
|
||||||
Layout.preferredWidth: 22
|
Layout.preferredWidth: 22
|
||||||
Layout.preferredHeight: 22
|
Layout.preferredHeight: 22
|
||||||
width: 22
|
width: 22
|
||||||
@@ -200,14 +203,12 @@ Rectangle {
|
|||||||
buttonIcon: StudioTheme.Constants.closeCross
|
buttonIcon: StudioTheme.Constants.closeCross
|
||||||
|
|
||||||
onClicked: annotationEditor.removeFullAnnotation()
|
onClicked: annotationEditor.removeFullAnnotation()
|
||||||
|
|
||||||
onHoveredChanged: annotationEditor.checkAux()
|
onHoveredChanged: annotationEditor.checkAux()
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
StudioControls.AbstractButton {
|
||||||
id: addAnnotationButton
|
id: addAnnotationButton
|
||||||
enabled: !annotationEditor.hasAuxData
|
visible: !annotationEditor.hasAuxData
|
||||||
visible: enabled
|
|
||||||
|
|
||||||
buttonIcon: qsTr("Add Annotation")
|
buttonIcon: qsTr("Add Annotation")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFont: StudioTheme.Constants.font
|
||||||
@@ -223,8 +224,7 @@ Rectangle {
|
|||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: 22
|
Layout.preferredWidth: 22
|
||||||
Layout.preferredHeight: 22
|
Layout.preferredHeight: 22
|
||||||
enabled: !annotationEditor.hasAuxData
|
visible: !annotationEditor.hasAuxData
|
||||||
visible: enabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AnnotationEditor {
|
AnnotationEditor {
|
||||||
|
@@ -261,7 +261,6 @@ void FormEditorAnnotationIcon::drawReader()
|
|||||||
++currentColumn;
|
++currentColumn;
|
||||||
|
|
||||||
newPos = commentsStartPosition + QPointF(currentColumn * (offset + width), 0);
|
newPos = commentsStartPosition + QPointF(currentColumn * (offset + width), 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//few normal comments, lets stack them
|
//few normal comments, lets stack them
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user