QmlDesigner.propertyEditor: implements aspect ratio locking

deactivated for now, since the form editor does not support it, yet.
See: BAUHAUS-496
This commit is contained in:
Thomas Hartmann
2010-04-13 15:09:52 +02:00
parent 99b769dd1b
commit 64ade0d94f

View File

@@ -8,6 +8,7 @@ GroupBox {
caption: qsTr("Geometry") caption: qsTr("Geometry")
layout: VerticalLayout { layout: VerticalLayout {
bottomMargin: 12
QWidget { // 1 QWidget { // 1
layout: HorizontalLayout { layout: HorizontalLayout {
@@ -48,9 +49,11 @@ GroupBox {
} //QWidget //1 } //QWidget //1
QWidget { QWidget {
id: bottomWidget
layout: HorizontalLayout { layout: HorizontalLayout {
Label { Label {
id: sizeLabel
text: qsTr("Size") text: qsTr("Size")
} }
@@ -82,4 +85,17 @@ GroupBox {
} //QVBoxLayout } //QVBoxLayout
} //QWidget } //QWidget
} //QHBoxLayout } //QHBoxLayout
QPushButton {
checkable: true
toolTip: qsTr("Lock aspect ratio")
fixedWidth: 45
width: fixedWidth
fixedHeight: 9
height: fixedHeight
styleSheetFile: "aspectlock.css";
x: bottomWidget.x + ((bottomWidget.width - sizeLabel.width) / 2) + sizeLabel.width - 8
y: bottomWidget.y + bottomWidget.height + 2
visible: false //hide until the visual editor implements this feature ###
}
} //QGroupBox } //QGroupBox