From 1a960865a2821c292c51a4d5acb870aaeb461b22 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 21 Oct 2013 12:03:41 +0200 Subject: QmlDesigner.PropertyEditor: fix for point and pixel size Task-number: QTCREATORBUG-9769 Change-Id: I1a1a9ebbda78daec0a62cb2e7c7859a636da57dd Reviewed-by: Thomas Hartmann --- .../propertyeditor/HelperWidgets/FontGroupBox.qml | 23 +++++++++++++++++----- 1 file 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") -- cgit v1.2.1