forked from qt-creator/qt-creator
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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user