forked from qt-creator/qt-creator
QmlDesigner: Cleanup FlickableSection
* Add true/false label to CheckBoxes * Move and add missing tooltip * Remove redundancy by wrapping ExpandingSpacer from StudioControls Change-Id: I6ec5d534ea9d71bda54a9f16359479d02d057511 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
d83243fbe6
commit
49cde7aca0
@@ -23,10 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.1
|
import StudioControls 1.0 as StudioControls
|
||||||
import QtQuick.Controls 1.0 as Controls
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
|
|
||||||
Item {
|
StudioControls.ExpandingSpacer {
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,8 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -65,7 +66,8 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -81,18 +83,21 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text:qsTr("Interactive")
|
text: qsTr("Interactive")
|
||||||
|
tooltip: qsTr("Describes whether the user can interact with the Flickable. A user cannot drag or flick a Flickable that is not interactive.")
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.interactive
|
backendValue: backendValues.interactive
|
||||||
|
text: backendValues.interactive.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +114,6 @@ Section {
|
|||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +130,6 @@ Section {
|
|||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,21 +146,21 @@ Section {
|
|||||||
maximumValue: 2000
|
maximumValue: 2000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text:qsTr("Pixel aligned")
|
text: qsTr("Pixel aligned")
|
||||||
|
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.pixelAligned
|
backendValue: backendValues.pixelAligned
|
||||||
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
|
text: backendValues.pixelAligned.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,7 +173,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "W"
|
text: "W"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -178,6 +181,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -187,7 +191,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "H"
|
text: "H"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -195,11 +199,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +213,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "X"
|
text: "X"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -219,6 +221,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -228,7 +231,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Y"
|
text: "Y"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -236,11 +239,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +254,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Top"
|
text: "Top"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -262,6 +263,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -271,7 +273,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Bottom"
|
text: "Bottom"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -280,9 +282,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +297,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Left"
|
text: "Left"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -304,6 +306,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -313,7 +316,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Right"
|
text: "Right"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -322,11 +325,10 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user