aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2019-09-02 17:33:23 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2019-09-03 09:12:29 +0000
commit428d8f03079a531c45cc3dfb79b58e307aa12ffd (patch)
tree96a602a081f4fb46d5fa95e3b146ca5acfede9b3 /share
parent489c9b2e58de5d819302d73bf8d28abd65f251be (diff)
QmlDesigner: PropertyEditor cleanup
* Adapt SpinBox ranges and decimals * Add missing qsTr() to labels Change-Id: If85999a22778b6f61e30f7437905354884086596 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml14
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml4
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ImageSpecifics.qml8
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml4
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/PathViewSpecifics.qml2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml41
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Label.qml2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MarginSection.qml20
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml2
11 files changed, 55 insertions, 50 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml
index 6d9c073c77..ab6b17dd12 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml
@@ -53,8 +53,8 @@ Section {
backendValue: backendValues.scale
hasSlider: true
decimals: 2
- minimumValue: 0.01
stepSize: 0.1
+ minimumValue: -10
maximumValue: 10
Layout.preferredWidth: 140
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml
index 2514fde1d3..602a713b6a 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml
@@ -62,7 +62,7 @@ RowLayout {
property alias buttonRow: buttonRow
- readonly property color __defaultTextColor: Theme.color(Theme.PanelTextColorLight)
+ readonly property color __defaultTextColor: StudioTheme.Values.themeTextColor
IconLabel {
id: icon
@@ -135,13 +135,13 @@ RowLayout {
id: group
}
- StudioControls.AbstractButton {
+ AbstractButton {
id: buttonSameEdge
buttonIcon: verticalAnchor ? StudioTheme.Constants.anchorTop : StudioTheme.Constants.anchorLeft
checkable: true
autoExclusive: true
StudioControls.ButtonGroup.group: group
- //tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.")
+ tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.")
onClicked: {
if (!invertRelativeTargets)
sameEdgeButtonClicked();
@@ -149,22 +149,22 @@ RowLayout {
oppositeEdgeButtonClicked();
}
}
- StudioControls.AbstractButton {
+ AbstractButton {
id: buttonCenter
buttonIcon: verticalAnchor ? StudioTheme.Constants.centerVertical : StudioTheme.Constants.centerHorizontal
checkable: true
autoExclusive: true
StudioControls.ButtonGroup.group: group
- //tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.")
+ tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.")
onClicked: centerButtonClicked();
}
- StudioControls.AbstractButton {
+ AbstractButton {
id: buttonOppositeEdge
buttonIcon: verticalAnchor ? StudioTheme.Constants.anchorBottom : StudioTheme.Constants.anchorRight
checkable: true
autoExclusive: true
StudioControls.ButtonGroup.group: group
- //tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.")
+ tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.")
onClicked: {
if (!invertRelativeTargets)
oppositeEdgeButtonClicked();
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml
index 0f2cb21b30..6b0b0de835 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Controls/PopupSection.qml
@@ -158,8 +158,8 @@ Section {
}
SecondColumnLayout {
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -4000
+ maximumValue: 4000
decimals: 0
backendValue: backendValues.spacing
Layout.fillWidth: true
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ImageSpecifics.qml
index ebf07866aa..8f742f06e2 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ImageSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ImageSpecifics.qml
@@ -80,8 +80,8 @@ Column {
SpinBox {
backendValue: backendValues.sourceSize_width
- minimumValue: -2000
- maximumValue: 2000
+ minimumValue: 0
+ maximumValue: 8192
decimals: 0
}
@@ -97,8 +97,8 @@ Column {
SpinBox {
backendValue: backendValues.sourceSize_height
- minimumValue: -2000
- maximumValue: 2000
+ minimumValue: 0
+ maximumValue: 8192
decimals: 0
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
index ed3d74304b..058cbb724a 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
@@ -130,8 +130,8 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.spacing
- minimumValue: 0
- maximumValue: 1000
+ minimumValue: -4000
+ maximumValue: 4000
decimals: 0
}
ExpandingSpacer {
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/PathViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/PathViewSpecifics.qml
index f3bd9d9b3d..b2d48045ec 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/PathViewSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/PathViewSpecifics.qml
@@ -166,6 +166,7 @@ Column {
backendValue: backendValues.preferredHighlightBegin
minimumValue: 0
maximumValue: 1
+ stepSize: 0.1
decimals: 2
}
ExpandingSpacer {
@@ -182,6 +183,7 @@ Column {
backendValue: backendValues.preferredHighlightEnd
minimumValue: 0
maximumValue: 1
+ stepSize: 0.1
decimals: 2
}
ExpandingSpacer {
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
index 8725ba6979..2b97df0646 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
@@ -34,6 +34,7 @@ Section {
id: root
+ property int labelWidth: 42
property int spinBoxWidth: 96
SectionLayout {
@@ -173,13 +174,13 @@ Section {
Label {
text: "W"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.contentWidth
minimumValue: 0
- maximumValue: 8000
+ maximumValue: 10000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
@@ -191,13 +192,13 @@ Section {
Label {
text: "H"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.contentHeight
minimumValue: 0
- maximumValue: 8000
+ maximumValue: 10000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
@@ -213,12 +214,12 @@ Section {
Label {
text: "X"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.contentX
- minimumValue: 0
+ minimumValue: -8000
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
@@ -231,12 +232,12 @@ Section {
Label {
text: "Y"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.contentY
- minimumValue: 0
+ minimumValue: -8000
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
@@ -254,13 +255,13 @@ Section {
Label {
text: "Top"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.topMargin
- maximumValue: 0xffff
- minimumValue: 0
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
@@ -273,13 +274,13 @@ Section {
Label {
text: "Bottom"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.bottomMargin
- maximumValue: 0xffff
- minimumValue: 0
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
@@ -297,13 +298,13 @@ Section {
Label {
text: "Left"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.leftMargin
- maximumValue: 0xffff
- minimumValue: 0
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
@@ -316,13 +317,13 @@ Section {
Label {
text: "Right"
- width: 42
+ width: root.labelWidth
}
SpinBox {
backendValue: backendValues.rightMargin
- maximumValue: 0xffff
- minimumValue: 0
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Label.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Label.qml
index e4129c6dcf..ce1a0d4154 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Label.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Label.qml
@@ -38,7 +38,7 @@ Controls.Label {
property alias toolTip: toolTipArea.tooltip
width: Math.max(Math.min(240, parent.width - 280), 50)
- color: Theme.color(Theme.PanelTextColorLight)
+ color: StudioTheme.Values.themeTextColor
elide: Text.ElideRight
font.pixelSize: StudioTheme.Values.myFontSize
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MarginSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MarginSection.qml
index 153d7cb27b..63b8f8702b 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MarginSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/MarginSection.qml
@@ -45,8 +45,8 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.topMargin
Layout.fillWidth: true
@@ -62,8 +62,8 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.bottomMargin
Layout.fillWidth: true
@@ -80,8 +80,8 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.leftMargin
Layout.fillWidth: true
@@ -97,8 +97,8 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.rightMargin
Layout.fillWidth: true
@@ -111,8 +111,8 @@ Section {
}
SecondColumnLayout {
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
+ minimumValue: -10000
+ maximumValue: 10000
decimals: 0
backendValue: backendValues.margins
Layout.fillWidth: true
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
index 10b09287b7..583b11ee9a 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.1
-import QtQuick.Controls 1.1 as Controls
+import QtQuick.Controls 2.12 as Controls
import QtQuick.Layouts 1.0
import QtQuickDesignerTheme 1.0
import StudioTheme 1.0 as StudioTheme
@@ -52,7 +52,7 @@ Item {
Controls.Label {
id: label
anchors.verticalCenter: parent.verticalCenter
- color: Theme.color(Theme.PanelTextColorLight)
+ color: StudioTheme.Values.themeTextColor
x: 22
font.bold: true
font.pixelSize: StudioTheme.Values.myFontSize
@@ -75,7 +75,7 @@ Item {
}
- color: Theme.color(Theme.BackgroundColorDark)
+ color: StudioTheme.Values.themeSectionHeadBackground
Rectangle {
visible: false
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml
index 46d2141adc..32136421a4 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml
@@ -123,6 +123,8 @@ QtObject {
property string themeTranslationIndicatorBorder: "#7f7f7f"
+ property string themeSectionHeadBackground: "#191919"
+
// Taken out of Constants.js
property string themeChangedStateText: "#99ccff"
}