Commit 0c982a30 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: I "fixed" the resize behaivour

With this change the leading label will be resized first if the user
increases the size of the property editor.
So if property names are too long (elided), due to translation or
because the pane was generated automatically, the user is able to resize
the label.
parent b1dac076
......@@ -70,7 +70,7 @@ QWidget { //This is a special doubleSpinBox that does color coding for states
id: label;
font.bold: true;
alignment: doubleSpinBox.alignRight ? "Qt::AlignRight | Qt::AlignVCenter" : "Qt::AlignLeft | Qt::AlignVCenter";
fixedWidth: 76
fixedWidth: frame.labelWidth
visible: doubleSpinBox.text != "";
toolTip: text
}
......
......@@ -4,5 +4,5 @@ import Bauhaus 1.0
QLabel {
id: label
alignment: "Qt::AlignRight | Qt::AlignVCenter"
fixedWidth: 76
fixedWidth: frame.labelWidth
}
......@@ -5,6 +5,21 @@ WidgetFrame {
id: propertyFrame;
minimumWidth: 300;
property int frameWidth: width
property int labelWidth: 76
onFrameWidthChanged: {
if (frameWidth > 300) {
var moreSpace = (frameWidth - 300) / 3;
var newFixedWidth = 76 + moreSpace;
if (newFixedWidth > 200)
newFixedWidth = 200;
labelWidth = newFixedWidth;
} else {
labelWidth = 76;
}
}
objectName: "propertyEditorFrame"
styleSheetFile: "propertyEditor.css";
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment