From 5d5c4aa9cceb469c4ec178416109d010c2b15a46 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 11:41:28 +0200 Subject: [PATCH] QmlDesigner: Adding support for fontSizeMode Change-Id: I34d5b4b801951929c8463ac741ee89977a017781 Reviewed-by: Tim Jenssen --- .../HelperWidgets/StandardTextSection.qml | 12 ++++++++++++ .../QtQuick/TextSpecifics.qml | 1 + 2 files changed, 13 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml index f298d90134c..5fb4d612fb2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml @@ -37,6 +37,7 @@ Section { property bool showVerticalAlignment: false property bool useLineEdit: true property bool showFormatProperty: false + property bool showFontSizeMode: false SectionLayout { columns: 2 @@ -116,5 +117,16 @@ Section { backendValue: backendValues.renderType Layout.fillWidth: true } + + Label { + text: qsTr("Font size mode") + toolTip: qsTr("Specifies how the font size of the displayed text is determined.") + } + ComboBox { + scope: "Text" + model: ["FixedSize", "HorizontalFit", "VerticalFit", "Fit"] + backendValue: backendValues.fontSizeMode + Layout.fillWidth: true + } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml index 28910fc05a4..64ea73f1cd6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml @@ -37,6 +37,7 @@ Column { showVerticalAlignment: true showFormatProperty: true showElide: true + showFontSizeMode: true } Section {