diff options
Diffstat (limited to 'tests/manual/qscreen/main.cpp')
-rw-r--r-- | tests/manual/qscreen/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/manual/qscreen/main.cpp b/tests/manual/qscreen/main.cpp index 487e95266b..dc1e0e08c0 100644 --- a/tests/manual/qscreen/main.cpp +++ b/tests/manual/qscreen/main.cpp @@ -80,8 +80,11 @@ void screenAdded(QScreen* screen) // But this works as long as the screens are all virtual siblings w->show(); QRect geom = w->geometry(); + geom.setSize(w->sizeHint()); + if (geom.height() > screen->geometry().height()) + geom.setHeight(screen->geometry().height() * 9 / 10); geom.moveCenter(screen->geometry().center()); - w->move(geom.topLeft()); + w->setGeometry(geom); props->insert(screen, w); |