forked from qt-creator/qt-creator
QmlDesigner: Layout and source cleanup
* Cleanup positioner specifics, mostly by adding ExpandingSpacer * Fix GridViewSpecifics SpinBox Label distance * Remove some semicolons * Add missing label (true/false) to CheckBoxes * Fix a few indentions Change-Id: I2b86dde58ddfc1aa78ed3e11c41b0f4eedfc412b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
49cde7aca0
commit
4cd3b10069
@@ -43,13 +43,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Flow"
|
||||
model: ["LeftToRight", "TopToBottom"]
|
||||
backendValue: backendValues.flow
|
||||
scope: "Flow"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,12 +58,13 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Qt"
|
||||
model: ["LeftToRight", "RightToLeft"]
|
||||
backendValue: backendValues.layoutDirection
|
||||
Layout.fillWidth: true
|
||||
scope: "Qt"
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -78,7 +78,6 @@ Column {
|
||||
maximumValue: 4000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
@@ -51,13 +51,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.cacheBuffer
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,47 +64,48 @@ Column {
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
|
||||
Label {
|
||||
text: "W"
|
||||
width: 12
|
||||
}
|
||||
|
||||
SpinBox {
|
||||
backendValue: backendValues.cellWidth
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 4
|
||||
height: 4
|
||||
}
|
||||
|
||||
Label {
|
||||
text: "H"
|
||||
width: 12
|
||||
}
|
||||
|
||||
SpinBox {
|
||||
backendValue: backendValues.cellHeight
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Label {
|
||||
text: qsTr("Flow")
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "GridView"
|
||||
model: ["FlowLeftToRight", "FlowTopToBottom"]
|
||||
backendValue: backendValues.flow
|
||||
Layout.fillWidth: true
|
||||
scope: "GridView"
|
||||
}
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,11 +116,11 @@ Column {
|
||||
|
||||
SectionLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.keyNavigationWraps
|
||||
text: backendValues.keyNavigationWraps.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,10 +130,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Qt"
|
||||
model: ["LeftToRight", "RightToLeft"]
|
||||
backendValue: backendValues.layoutDirection
|
||||
Layout.fillWidth: true
|
||||
scope: "Qt"
|
||||
}
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,10 +146,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "GridView"
|
||||
model: ["NoSnap", "SnapToRow", "SnapOneRow"]
|
||||
backendValue: backendValues.snapMode
|
||||
Layout.fillWidth: true
|
||||
scope: "GridView"
|
||||
}
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,14 +172,15 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "GridView"
|
||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||
backendValue: backendValues.highlightRangeMode
|
||||
Layout.fillWidth: true
|
||||
scope: "GridView"
|
||||
}
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Label {
|
||||
text: qsTr("Move duration")
|
||||
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
||||
@@ -185,13 +189,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightMoveDuration
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,13 +205,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightMoveSpeed
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,13 +221,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightBegin
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,13 +237,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightEnd
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,11 +252,11 @@ Column {
|
||||
|
||||
SectionLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.highlightFollowsCurrentItem
|
||||
text: backendValues.highlightFollowsCurrentItem.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -43,12 +43,11 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
UrlChooser {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.source
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.source
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,15 +57,14 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Image"
|
||||
model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"]
|
||||
backendValue: backendValues.fillMode
|
||||
implicitWidth: 180
|
||||
Layout.fillWidth: true
|
||||
scope: "Image"
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +85,11 @@ Column {
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 4
|
||||
height: 4
|
||||
}
|
||||
|
||||
Label {
|
||||
text: "H"
|
||||
width: 12
|
||||
@@ -100,7 +103,6 @@ Column {
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,13 +51,12 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.cacheBuffer
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,11 +67,11 @@ Column {
|
||||
|
||||
SectionLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.keyNavigationWraps
|
||||
text: backendValues.keyNavigationWraps.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,12 +82,13 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "ListView"
|
||||
model: ["Horizontal", "Vertical"]
|
||||
backendValue: backendValues.orientation
|
||||
Layout.fillWidth: true
|
||||
scope: "ListView"
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -97,14 +97,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "Qt"
|
||||
model: ["LeftToRight", "RightToLeft"]
|
||||
backendValue: backendValues.layoutDirection
|
||||
scope: "Qt"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,14 +113,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "ListView"
|
||||
model: ["NoSnap", "SnapToItem", "SnapOneItem"]
|
||||
backendValue: backendValues.snapMode
|
||||
scope: "ListView"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,13 +130,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.spacing
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,14 +155,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "ListView"
|
||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||
backendValue: backendValues.highlightRangeMode
|
||||
Layout.fillWidth: true
|
||||
scope: "ListView"
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,13 +173,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightMoveDuration
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,13 +189,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightMoveSpeed
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,13 +205,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightResizeDuration
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,13 +221,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightBegin
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,13 +237,11 @@ Column {
|
||||
SectionLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightEnd
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,11 +252,11 @@ Column {
|
||||
|
||||
SectionLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.highlightFollowsCurrentItem
|
||||
text: backendValues.highlightFollowsCurrentItem.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -44,11 +44,12 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.enabled
|
||||
text: backendValues.enabled.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +60,9 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.hoverEnabled
|
||||
text: backendValues.hoverEnabled.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
@@ -46,13 +46,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.dragMargin
|
||||
minimumValue: 0;
|
||||
maximumValue: 100;
|
||||
minimumValue: 0
|
||||
maximumValue: 100
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,13 +61,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.flickDeceleration
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,11 +76,11 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.interactive
|
||||
text: backendValues.interactive.valueToString
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,13 +92,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.offset
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,13 +108,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.pathItemCount
|
||||
minimumValue: -1;
|
||||
maximumValue: 1000;
|
||||
minimumValue: -1
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,18 +131,15 @@ Column {
|
||||
|
||||
SecondColumnLayout {
|
||||
ComboBox {
|
||||
scope: "PathView"
|
||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||
backendValue: backendValues.highlightRangeMode
|
||||
Layout.fillWidth: true
|
||||
scope: "PathView"
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Label {
|
||||
text: qsTr("Move duration")
|
||||
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
||||
@@ -159,13 +148,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.highlightMoveDuration
|
||||
minimumValue: 0;
|
||||
maximumValue: 1000;
|
||||
minimumValue: 0
|
||||
maximumValue: 1000
|
||||
decimals: 0
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,13 +164,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightBegin
|
||||
minimumValue: 0;
|
||||
maximumValue: 1;
|
||||
minimumValue: 0
|
||||
maximumValue: 1
|
||||
decimals: 2
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,13 +180,11 @@ Column {
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
backendValue: backendValues.preferredHighlightEnd
|
||||
minimumValue: 0;
|
||||
maximumValue: 1;
|
||||
minimumValue: 0
|
||||
maximumValue: 1
|
||||
decimals: 2
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import QtQuick.Layouts 1.0
|
||||
|
||||
|
||||
Section {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
@@ -40,7 +39,6 @@ Section {
|
||||
rows: 4
|
||||
columns: 2
|
||||
|
||||
|
||||
Label {
|
||||
visible: textInputSection.isTextInput
|
||||
text: qsTr("Input mask")
|
||||
@@ -62,7 +60,7 @@ Section {
|
||||
Layout.fillWidth: true
|
||||
backendValue: backendValues.echoMode
|
||||
scope: "TextInput"
|
||||
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
|
||||
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -85,25 +83,28 @@ Section {
|
||||
SecondColumnLayout {
|
||||
ColumnLayout {
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Read only")
|
||||
backendValue: backendValues.readOnly;
|
||||
backendValue: backendValues.readOnly
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Cursor visible")
|
||||
backendValue: backendValues.cursorVisible;
|
||||
backendValue: backendValues.cursorVisible
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Active focus on press")
|
||||
backendValue: backendValues.activeFocusOnPress;
|
||||
backendValue: backendValues.activeFocusOnPress
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Auto scroll")
|
||||
backendValue: backendValues.autoScroll;
|
||||
backendValue: backendValues.autoScroll
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user