QmlDesigner.PropertyEditor: fix for point and pixel size

Task-number: QTCREATORBUG-9769
Change-Id: I1a1a9ebbda78daec0a62cb2e7c7859a636da57dd
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Thomas Hartmann
2013-10-21 12:03:41 +02:00
parent a64adc4cd1
commit 1a960865a2

View File

@@ -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 {
@@ -65,13 +73,18 @@ GroupBox {
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")