forked from qt-creator/qt-creator
QmllDesigner: Fix dynamic properties layout
* Fix layout * Add missing qsTr() * Remove unnecessary alignment settings Change-Id: Ie8d90e61d39933e573cb119e5ed3a15fcbca9674 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
1b412a97ae
commit
eeeea090cc
@@ -53,11 +53,10 @@ Section {
|
|||||||
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: colorEditorControl.remove()
|
onClicked: colorEditorControl.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {}
|
ExpandingSpacer {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,24 +78,17 @@ Section {
|
|||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: 10
|
height: 10
|
||||||
implicitWidth: {
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||||
return StudioTheme.Values.twoControlColumnWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutInt.remove()
|
onClicked: layoutInt.remove()
|
||||||
}
|
}
|
||||||
@@ -124,24 +116,17 @@ Section {
|
|||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: 10
|
height: 10
|
||||||
implicitWidth: {
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||||
return StudioTheme.Values.twoControlColumnWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutReal.remove()
|
onClicked: layoutReal.remove()
|
||||||
}
|
}
|
||||||
@@ -165,12 +150,9 @@ Section {
|
|||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutString.remove()
|
onClicked: layoutString.remove()
|
||||||
}
|
}
|
||||||
@@ -192,27 +174,20 @@ Section {
|
|||||||
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
text: layoutBool.backendValue.value
|
text: layoutBool.backendValue.value
|
||||||
backendValue: layoutBool.backendValue
|
backendValue: layoutBool.backendValue
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: 10
|
height: 10
|
||||||
implicitWidth: {
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||||
return StudioTheme.Values.twoControlColumnWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutBool.remove()
|
onClicked: layoutBool.remove()
|
||||||
}
|
}
|
||||||
@@ -238,7 +213,6 @@ Section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutUrl.remove()
|
onClicked: layoutUrl.remove()
|
||||||
}
|
}
|
||||||
@@ -270,12 +244,9 @@ Section {
|
|||||||
showTranslateCheckBox: false
|
showTranslateCheckBox: false
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutAlias.remove()
|
onClicked: layoutAlias.remove()
|
||||||
}
|
}
|
||||||
@@ -301,12 +272,9 @@ Section {
|
|||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutTextureInput.remove()
|
onClicked: layoutTextureInput.remove()
|
||||||
}
|
}
|
||||||
@@ -411,7 +379,6 @@ Section {
|
|||||||
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
Spacer { implicitWidth: StudioTheme.Values.controlGap }
|
||||||
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutVector.remove()
|
onClicked: layoutVector.remove()
|
||||||
}
|
}
|
||||||
@@ -462,16 +429,12 @@ Section {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: 10
|
height: 10
|
||||||
implicitWidth: {
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
||||||
return StudioTheme.Values.twoControlColumnWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
+ StudioTheme.Values.actionIndicatorWidth
|
|
||||||
}
|
|
||||||
visible: vecSize === 2 // Placeholder for last spinbox
|
visible: vecSize === 2 // Placeholder for last spinbox
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
|
|
||||||
ExpandingSpacer {}
|
ExpandingSpacer {}
|
||||||
}
|
}
|
||||||
@@ -497,11 +460,9 @@ Section {
|
|||||||
+ StudioTheme.Values.actionIndicatorWidth
|
+ StudioTheme.Values.actionIndicatorWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer {
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
||||||
implicitWidth: StudioTheme.Values.twoControlColumnGap
|
|
||||||
}
|
|
||||||
IconIndicator {
|
IconIndicator {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
icon: StudioTheme.Constants.closeCross
|
icon: StudioTheme.Constants.closeCross
|
||||||
onClicked: layoutReadonly.remove()
|
onClicked: layoutReadonly.remove()
|
||||||
}
|
}
|
||||||
@@ -541,8 +502,9 @@ Section {
|
|||||||
active: repeater.loadActive
|
active: repeater.loadActive
|
||||||
width: loader.item ? loader.item.width : 0
|
width: loader.item ? loader.item.width : 0
|
||||||
height: loader.item ? loader.item.height : 0
|
height: loader.item ? loader.item.height : 0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
if (propertyType == "color")
|
if (propertyType == "color")
|
||||||
return colorEditor
|
return colorEditor
|
||||||
if (propertyType == "int")
|
if (propertyType == "int")
|
||||||
@@ -615,7 +577,6 @@ Section {
|
|||||||
Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth }
|
Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth }
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
StudioControls.AbstractButton {
|
||||||
|
|
||||||
id: plusButton
|
id: plusButton
|
||||||
buttonIcon: StudioTheme.Constants.plus
|
buttonIcon: StudioTheme.Constants.plus
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -691,7 +652,7 @@ Section {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
width: cePopup.width - 8
|
width: cePopup.width - 8
|
||||||
PropertyLabel {
|
PropertyLabel {
|
||||||
text: "Add New Property"
|
text: qsTr("Add New Property")
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
leftPadding: 8
|
leftPadding: 8
|
||||||
width: cePopup.width - closeIndicator.width - 24
|
width: cePopup.width - closeIndicator.width - 24
|
||||||
@@ -707,7 +668,7 @@ Section {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
PropertyLabel {
|
PropertyLabel {
|
||||||
id: textLabel
|
id: textLabel
|
||||||
text: "Name"
|
text: qsTr("Name")
|
||||||
width: cePopup.labelWidth
|
width: cePopup.labelWidth
|
||||||
}
|
}
|
||||||
StudioControls.TextField {
|
StudioControls.TextField {
|
||||||
@@ -720,7 +681,7 @@ Section {
|
|||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
PropertyLabel {
|
PropertyLabel {
|
||||||
text: "Type"
|
text: qsTr("Type")
|
||||||
width: cePopup.labelWidth
|
width: cePopup.labelWidth
|
||||||
}
|
}
|
||||||
StudioControls.ComboBox {
|
StudioControls.ComboBox {
|
||||||
|
Reference in New Issue
Block a user