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 underlineStyle: backendValues.font_underline
|
||||||
property variant strikeoutStyle: backendValues.font_strikeout
|
property variant strikeoutStyle: backendValues.font_strikeout
|
||||||
|
|
||||||
|
onPointSizeChanged: {
|
||||||
|
sizeWidget.setPointPixelSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
onPixelSizeChanged: {
|
||||||
|
sizeWidget.setPointPixelSize();
|
||||||
|
}
|
||||||
|
|
||||||
layout: VerticalLayout {
|
layout: VerticalLayout {
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@@ -65,13 +73,18 @@ GroupBox {
|
|||||||
property bool pixelSize: sizeType.currentText == "pixels"
|
property bool pixelSize: sizeType.currentText == "pixels"
|
||||||
property bool isSetup;
|
property bool isSetup;
|
||||||
|
|
||||||
onSelectionFlagChanged: {
|
function setPointPixelSize() {
|
||||||
isSetup = true;
|
isSetup = true;
|
||||||
sizeType.currentText = "points";
|
sizeType.currentText = "points";
|
||||||
if (pixelSize.isInModel)
|
if (fontGroupBox.pixelSize.isInModel)
|
||||||
sizeType.currentText = "pixels";
|
sizeType.currentText = "pixels";
|
||||||
isSetup = false;
|
isSetup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSelectionFlagChanged: {
|
||||||
|
setPointPixelSize();
|
||||||
|
}
|
||||||
|
|
||||||
layout: HorizontalLayout {
|
layout: HorizontalLayout {
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Size")
|
text: qsTr("Size")
|
||||||
|
Reference in New Issue
Block a user