summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2013-10-21 12:03:41 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2013-10-21 12:12:48 +0200
commit1a960865a2821c292c51a4d5acb870aaeb461b22 (patch)
treea9980b0381279a7fef89a7803bebb28104cbbc52
parenta64adc4cd114526e57d6091dc9a7528264259e62 (diff)
downloadqt-creator-2.8.tar.gz
QmlDesigner.PropertyEditor: fix for point and pixel size2.8
Task-number: QTCREATORBUG-9769 Change-Id: I1a1a9ebbda78daec0a62cb2e7c7859a636da57dd Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
-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")