OSDN Git Service

WelcomePage: reducing size of view
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Wed, 5 Oct 2011 14:14:17 +0000 (16:14 +0200)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Wed, 5 Oct 2011 15:14:50 +0000 (17:14 +0200)
Otherwise we might get an unnecessary scrollbar.

Change-Id: I12ab2288a02f32f542420b0e979c24aeaa00522d
Reviewed-on: http://codereview.qt-project.org/6063
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
share/qtcreator/welcomescreen/widgets/ExampleGridView.qml

index 379e09f..c9a0afb 100644 (file)
@@ -36,7 +36,7 @@ GridView {
     interactive: false
     width: scrollArea.width
     property int columns:  Math.max(Math.floor(width / cellWidth), 1)
-    height: 400 * (count - columns) / columns + 800
+    height: 400 * Math.ceil(count / columns)
     cellHeight: 400
     cellWidth: 350