Commit 14eb13e9 authored by Ulf Hermann's avatar Ulf Hermann

Timeline: Enforce a minimum width for detail windows.

We don't want to resize them to absurd dimensions.

Change-Id: I7f824919052c6740f291d2b0266fd009da99fd53
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 4b6c5536
...@@ -201,6 +201,17 @@ Item { ...@@ -201,6 +201,17 @@ Item {
y: 5 y: 5
spacing: 5 spacing: 5
columns: 2 columns: 2
property int minimumWidth: {
var result = 150;
for (var i = 0; i < children.length; ++i)
result = Math.max(children[i].x, result);
return result + 20;
}
onMinimumWidthChanged: {
if (dragHandle.x < minimumWidth)
dragHandle.x = minimumWidth;
}
Repeater { Repeater {
model: eventInfo model: eventInfo
...@@ -310,6 +321,7 @@ Item { ...@@ -310,6 +321,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
drag.target: parent drag.target: parent
drag.minimumX: col.minimumWidth
drag.axis: Drag.XAxis drag.axis: Drag.XAxis
cursorShape: Qt.SizeHorCursor cursorShape: Qt.SizeHorCursor
} }
......
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