aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-23 14:16:22 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-23 13:37:25 +0000
commitb9f5c47114c94974fcfe748057ffa8971b491e34 (patch)
tree38a7ac7dc1230ff6176fb15c1cdfc09c74d5f8c6 /examples
parent312eb820c0b7435c933b29b022d35ed928b6c096 (diff)
Popup: add implicit & content sizes
Behaves the same way than the Pane/Frame/GroupBox container controls. Change-Id: I370f3961b77a363a63a0a64fc629cc5da6dfd53f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/controls/gallery/gallery.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/controls/gallery/gallery.qml b/examples/controls/gallery/gallery.qml
index be9ff5df..d40e7f9b 100644
--- a/examples/controls/gallery/gallery.qml
+++ b/examples/controls/gallery/gallery.qml
@@ -287,12 +287,12 @@ ApplicationWindow {
modal: true
focus: true
x: (window.width - width) / 2
- y: (window.height - height) / 2
+ y: window.height / 6
width: Math.min(window.width, window.height) / 3 * 2
- height: aboutColumn.implicitHeight + topPadding + bottomPadding
+ contentHeight: aboutColumn.height
onPressedOutside: close()
- contentItem: Column {
+ Column {
id: aboutColumn
spacing: 20
Keys.onEscapePressed: aboutDialog.close() // TODO: Popup::closePolicy
@@ -303,14 +303,14 @@ ApplicationWindow {
}
Label {
- width: parent.width
+ width: aboutDialog.availableWidth
text: "The Qt Labs Controls module is a technology preview of the next generation user interface controls based on Qt Quick."
wrapMode: Label.Wrap
font.pixelSize: 12
}
Label {
- width: parent.width
+ width: aboutDialog.availableWidth
text: "In comparison to the desktop oriented Qt Quick Controls 1, the experimental Qt Labs "
+ "Controls are an order of magnitude simpler, lighter and faster, and are primarily targeting embedded "
+ "and mobile platforms."