aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2018-01-09 09:48:39 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2018-01-10 10:30:59 +0000
commit50ca0de846ae3e468e5e8ea596396f3664604fd9 (patch)
treeea8629ea687a917686174c392b8295c8ddca6243 /share
parent699dd2c426cb43060e0036f923927cc82c57ddef (diff)
QmlDesigner: Add missing font and text properties for Qt 5.10
Task-number: QTPM-862 Change-Id: I12813cf429f4f4a5a85c4e3c6d74eb7ac1a45bd2 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qml-type-descriptions/builtins.qmltypes2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml42
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml16
3 files changed, 54 insertions, 6 deletions
diff --git a/share/qtcreator/qml-type-descriptions/builtins.qmltypes b/share/qtcreator/qml-type-descriptions/builtins.qmltypes
index 811ad87c1e8..ec31791827f 100644
--- a/share/qtcreator/qml-type-descriptions/builtins.qmltypes
+++ b/share/qtcreator/qml-type-descriptions/builtins.qmltypes
@@ -673,6 +673,8 @@ Module {
Property { name: "capitalization"; type: "Capitalization" }
Property { name: "letterSpacing"; type: "qreal" }
Property { name: "wordSpacing"; type: "qreal" }
+ Property { name: "kerning"; type: "bool" }
+ Property { name: "preferShaping"; type: "bool" }
}
Component {
name: "QDeclarativeGradient"
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
index 2af88020c6d..de97df46b80 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
@@ -191,11 +191,13 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
- decimals: 0
+ maximumValue: 500
+ minimumValue: -500
+ decimals: 2
backendValue: backendValues.font_wordSpacing
Layout.fillWidth: true
+ Layout.minimumWidth: 60
+ stepSize: 0.1
}
Item {
width: 4
@@ -208,11 +210,39 @@ Section {
width: 42
}
SpinBox {
- maximumValue: 9999999
- minimumValue: -9999999
- decimals: 0
+ maximumValue: 500
+ minimumValue: -500
+ decimals: 2
backendValue: backendValues.font_letterSpacing
Layout.fillWidth: true
+ Layout.minimumWidth: 60
+ stepSize: 0.1
+ }
+ }
+
+ Label {
+ visible: minorQtQuickVersion > 9
+ text: qsTr("Performance")
+ }
+
+ SecondColumnLayout {
+ visible: minorQtQuickVersion > 9
+
+ CheckBox {
+ text: qsTr("Kerning")
+ Layout.fillWidth: true
+ backendValue: (backendValues.font_kerning === undefined) ? dummyBackendValue : backendValues.font_kerning
+ tooltip: qsTr("Enables or disables the kerning OpenType feature when shaping the text. This may " +
+ "improve performance when creating or changing the text, at the expense of some cosmetic features. The default value is true.")
+ }
+
+ CheckBox {
+ text: qsTr("Prefer Shaping")
+ Layout.fillWidth: true
+ backendValue: (backendValues.font_preferShaping === undefined) ? dummyBackendValue : backendValues.font_preferShaping
+ tooltip: qsTr("Sometimes, a font will apply complex rules to a set of characters in order to display them correctly.\n" +
+ "In some writing systems, such as Brahmic scripts, this is required in order for the text to be legible, but in e.g." +
+ "Latin script,\n it is merely a cosmetic feature. Setting the preferShaping property to false will disable all such features\nwhen they are not required, which will improve performance in most cases.")
}
}
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
index 5fb4d612fb2..152d17eb0bc 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml
@@ -128,5 +128,21 @@ Section {
backendValue: backendValues.fontSizeMode
Layout.fillWidth: true
}
+
+
+ Label {
+ text: qsTr("Line Height")
+ tooltip: qsTr("Sets the line height for the text.")
+ }
+
+ SpinBox {
+ Layout.fillWidth: true
+ backendValue: (backendValues.lineHeight === undefined) ? dummyBackendValue : backendValues.lineHeight
+ maximumValue: 500
+ minimumValue: 0
+ decimals: 2
+ stepSize: 0.1
+ }
+
}
}