summaryrefslogtreecommitdiff
path: root/src/controls/ApplicationWindow.qml
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-08-27 09:12:24 +0200
committerJan Arve Sæther <jan-arve.saether@digia.com>2014-08-28 09:39:09 +0200
commit10f0da6cfb56396a16ec741380556320fba86552 (patch)
tree1457c86c7659a1995b23865e4a76702a243f7a39 /src/controls/ApplicationWindow.qml
parent4648dc566f72454fb49142b9f55929c9b9502853 (diff)
downloadqtquickcontrols-10f0da6cfb56396a16ec741380556320fba86552.tar.gz
Do not shrink application window height to 0
The binding was always evaluated to 0 if __noImplicitHeightGiven was true. The solution is to move the condition to the Binding element, which will then cause it to not be triggered when it was previously be evaluated to 0. Task-number: QTBUG-38469 Change-Id: I6ff80e44069978ee9685ea2fbe52afc52425cbdc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/ApplicationWindow.qml')
-rw-r--r--src/controls/ApplicationWindow.qml13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml
index 185f33ef..bc2bf329 100644
--- a/src/controls/ApplicationWindow.qml
+++ b/src/controls/ApplicationWindow.qml
@@ -171,7 +171,7 @@ Window {
Binding {
target: root
property: "__width"
- when: root.minimumWidth <= root.maximumWidth
+ when: (root.minimumWidth <= root.maximumWidth) && !contentArea.__noImplicitWidthGiven
value: Math.max(Math.min(root.maximumWidth, contentArea.implicitWidth), root.minimumWidth)
}
/*! \internal */
@@ -179,11 +179,16 @@ Window {
Binding {
target: root
property: "__height"
- when: root.minimumHeight <= root.maximumHeight
+ when: (root.minimumHeight <= root.maximumHeight) && !contentArea.__noImplicitHeightGiven
value: Math.max(Math.min(root.maximumHeight, contentArea.implicitHeight + __topBottomMargins), root.minimumHeight)
}
- width: contentArea.__noImplicitWidthGiven ? 0 : __width
- height: contentArea.__noImplicitHeightGiven ? 0 : __height
+ /* As soon as an application developer writes
+ width: 200
+ this binding will be broken. This is the reason for this indirection
+ via __width (and __height)
+ */
+ width: __width
+ height: __height
minimumWidth: contentArea.__noMinimumWidthGiven ? 0 : contentArea.minimumWidth
minimumHeight: contentArea.__noMinimumHeightGiven ? 0 : (contentArea.minimumHeight + __topBottomMargins)