summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml23
1 files changed, 18 insertions, 5 deletions
diff --git a/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml
index 3ecd6aaf64..85f552b6dc 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml
@@ -44,6 +44,14 @@ GroupBox {
property variant underlineStyle: backendValues.font_underline
property variant strikeoutStyle: backendValues.font_strikeout
+ onPointSizeChanged: {
+ sizeWidget.setPointPixelSize();
+ }
+
+ onPixelSizeChanged: {
+ sizeWidget.setPointPixelSize();
+ }
+
layout: VerticalLayout {
QWidget {
@@ -61,17 +69,22 @@ GroupBox {
QWidget {
id: sizeWidget
property bool selectionFlag: selectionChanged
-
+
property bool pixelSize: sizeType.currentText == "pixels"
property bool isSetup;
-
- onSelectionFlagChanged: {
+
+ function setPointPixelSize() {
isSetup = true;
sizeType.currentText = "points";
- if (pixelSize.isInModel)
+ if (fontGroupBox.pixelSize.isInModel)
sizeType.currentText = "pixels";
isSetup = false;
- }
+ }
+
+ onSelectionFlagChanged: {
+ setPointPixelSize();
+ }
+
layout: HorizontalLayout {
Label {
text: qsTr("Size")