aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml25
1 files changed, 23 insertions, 2 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
index 6132cfd261..f7cf3be4ab 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
@@ -76,6 +76,7 @@ Section {
Label {
visible: showVerticalAlignment
text: qsTr("Wrap mode")
+ disabledState: !backendValues.wrapMode.isAvailable
}
ComboBox {
@@ -84,11 +85,13 @@ Section {
backendValue: backendValues.wrapMode
scope: "Text"
model: ["NoWrap", "WordWrap", "WrapAnywhere", "Wrap"]
+ enabled: backendValue.isAvailable
}
Label {
visible: showElide
text: qsTr("Elide")
+ disabledState: !backendValues.elide.isAvailable
}
ComboBox {
@@ -97,12 +100,14 @@ Section {
backendValue: backendValues.elide
scope: "Text"
model: ["ElideNone", "ElideLeft", "ElideMiddle", "ElideRight"]
+ enabled: backendValue.isAvailable
}
Label {
visible: showElide
text: qsTr("Maximum line count")
tooltip: qsTr("Limits the number of lines that the text item will show.")
+ disabledState: !backendValues.maximumLineCount.isAvailable
}
SpinBox {
@@ -112,6 +117,7 @@ Section {
minimumValue: 0
maximumValue: 10000
decimals: 0
+ enabled: backendValue.isAvailable
}
Label {
@@ -135,6 +141,7 @@ Section {
Label {
visible: showFormatProperty
text: qsTr("Format")
+ disabledState: !backendValues.textFormat.isAvailable
}
ComboBox {
scope: "Text"
@@ -142,23 +149,27 @@ Section {
model: ["PlainText", "RichText", "AutoText"]
backendValue: backendValues.textFormat
Layout.fillWidth: true
+ enabled: backendValue.isAvailable
}
Label {
text: qsTr("Render type")
toolTip: qsTr("Override the default rendering type for this item.")
+ disabledState: !backendValues.renderType.isAvailable
}
ComboBox {
scope: "Text"
model: ["QtRendering", "NativeRendering"]
backendValue: backendValues.renderType
Layout.fillWidth: true
+ enabled: backendValue.isAvailable
}
Label {
visible: showFontSizeMode
text: qsTr("Font size mode")
toolTip: qsTr("Specifies how the font size of the displayed text is determined.")
+ disabledState: !backendValues.fontSizeMode.isAvailable
}
ComboBox {
id: fontSizeMode
@@ -167,17 +178,20 @@ Section {
model: ["FixedSize", "HorizontalFit", "VerticalFit", "Fit"]
backendValue: backendValues.fontSizeMode
Layout.fillWidth: true
+ enabled: backendValue.isAvailable
}
Label {
visible: showFontSizeMode
text: qsTr("Minimum size")
+ disabledState: !backendValues.minimumPixelSize.isAvailable
+ && !backendValues.minimumPointSize.isAvailable
}
SecondColumnLayout {
visible: showFontSizeMode
SpinBox {
- enabled: fontSizeMode.currentIndex !== 0
+ enabled: (fontSizeMode.currentIndex !== 0) || backendValue.isAvailable
minimumValue: 0
maximumValue: 500
decimals: 0
@@ -189,6 +203,7 @@ Section {
text: qsTr("Pixel")
tooltip: qsTr("Specifies the minimum font pixel size of scaled text.")
width: 42
+ disabledState: !backendValues.minimumPixelSize.isAvailable
}
Item {
@@ -197,7 +212,7 @@ Section {
}
SpinBox {
- enabled: fontSizeMode.currentIndex !== 0
+ enabled: (fontSizeMode.currentIndex !== 0) || backendValue.isAvailable
minimumValue: 0
maximumValue: 500
decimals: 0
@@ -209,6 +224,7 @@ Section {
text: qsTr("Point")
tooltip: qsTr("Specifies the minimum font point size of scaled text.")
width: 42
+ disabledState: !backendValues.minimumPointSize.isAvailable
}
}
@@ -216,9 +232,11 @@ Section {
visible: showLineHeight
text: qsTr("Line height")
tooltip: qsTr("Sets the line height for the text.")
+ disabledState: !lineHeightSpinBox.enabled
}
SpinBox {
+ id: lineHeightSpinBox
visible: showLineHeight
Layout.fillWidth: true
backendValue: (backendValues.lineHeight === undefined) ? dummyBackendValue : backendValues.lineHeight
@@ -226,12 +244,14 @@ Section {
minimumValue: 0
decimals: 2
stepSize: 0.1
+ enabled: backendValue.isAvailable
}
Label {
visible: showLineHeight
text: qsTr("Line height mode")
toolTip: qsTr("Determines how the line height is specified.")
+ disabledState: !backendValues.lineHeightMode.isAvailable
}
ComboBox {
visible: showLineHeight
@@ -239,6 +259,7 @@ Section {
model: ["ProportionalHeight", "FixedHeight"]
backendValue: backendValues.lineHeightMode
Layout.fillWidth: true
+ enabled: backendValue.isAvailable
}
}