diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-10-08 17:39:02 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-10-13 12:21:06 +0200 |
commit | 35589b1f5a4e86856c7024bbfb067e0835c703f6 (patch) | |
tree | 8975b9c221897dec7d5bc15a6551d399009c002d /src/dialogs/DefaultFileDialog.qml | |
parent | aecdaf53ceb2f3fbb5b37b1977fbd74bc21bbb4f (diff) | |
download | qtquickcontrols-35589b1f5a4e86856c7024bbfb067e0835c703f6.tar.gz |
Dialogs: added private maximumDimension property for initial size
The Screen.attached property does not know which screen will be used
until the dialog is shown, but we need to know how big the desktop is
before it is shown in order to constrain a reasonable dialog size,
before the Flow lays out the buttons. Otherwise it will be too tall.
Task-number: QTBUG-41734
Change-Id: I44349fab4ad0254d2c6faf30c759fb9e52eebf03
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/dialogs/DefaultFileDialog.qml')
-rw-r--r-- | src/dialogs/DefaultFileDialog.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml index feb31c4d..99623d62 100644 --- a/src/dialogs/DefaultFileDialog.qml +++ b/src/dialogs/DefaultFileDialog.qml @@ -120,10 +120,9 @@ AbstractFileDialog { } Rectangle { - property int maxSize: Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight) - implicitWidth: Math.min(maxSize, Math.max(Screen.pixelDensity * 100, splitter.implicitWidth)) - implicitHeight: Math.min(maxSize, Screen.pixelDensity * 80) id: window + implicitWidth: Math.min(root.__maximumDimension, Math.max(Screen.pixelDensity * 100, splitter.implicitWidth)) + implicitHeight: Math.min(root.__maximumDimension, Screen.pixelDensity * 80) color: root.palette.window Binding { |