Commit 577203d4 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: layout fix

The layout was quite broken and was not working with translations.

Task-number: QTCREATORBUG-5081
Change-Id: Ibc36eacb611e46fddd26867cdf2a13cf303bde36
Reviewed-on: http://codereview.qt.nokia.com/1503

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent bf4e1c42
......@@ -52,6 +52,7 @@ QWidget {
id: label
text: caption
toolTip: caption
visible: caption != ""
}
SpinBox {
......
......@@ -43,9 +43,8 @@ GroupBox {
property bool isInBaseState: isBaseState
property variant targetLabelWidth: 90 - 20 - 26
property int leftMarginMargin: 16
property variant targetLabelWidth: 60
property int leftMarginMargin: 16 + 10 + 10
layout: VerticalLayout {
Label {
text: qsTr("Anchors")
......@@ -91,17 +90,20 @@ GroupBox {
selectedItemNode: anchorBackend.topTarget
onSelectedItemNodeChanged: { anchorBackend.topTarget = selectedItemNode; }
}
}
}
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
id:topbox
slider: false
caption: qsTr("Margin")
caption: ""
backendValue: backendValues.anchors_topMargin
baseStateFlag: isInBaseState;
maximumValue: 999
......@@ -149,9 +151,13 @@ GroupBox {
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
slider: false
caption: qsTr("Margin")
caption: ""
backendValue: backendValues.anchors_bottomMargin
baseStateFlag: isInBaseState;
maximumValue: 999
......@@ -198,9 +204,13 @@ GroupBox {
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
slider: false
caption: qsTr("Margin")
caption: ""
backendValue: backendValues.anchors_leftMargin
baseStateFlag: isInBaseState;
maximumValue: 999
......@@ -247,9 +257,13 @@ GroupBox {
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
slider: false
caption: qsTr("Margin")
caption: ""
backendValue: backendValues.anchors_rightMargin
baseStateFlag: isInBaseState;
maximumValue: 999
......@@ -296,9 +310,13 @@ GroupBox {
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
slider: false
caption: qsTr("Margin")
caption: ""
baseStateFlag: isInBaseState;
backendValue: backendValues.anchors_horizontalCenterOffset
maximumValue: 999
......@@ -345,9 +363,13 @@ GroupBox {
QWidget {
layout : HorizontalLayout {
leftMargin: leftMarginMargin
Label {
text: qsTr("Margin")
fixedWidth: targetLabelWidth
}
IntEditor {
slider: false
caption: qsTr("Margin")
caption: ""
backendValue: backendValues.anchors_verticalCenterOffset
baseStateFlag: isInBaseState;
maximumValue: 999
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment