Improve default window size

Okular's current default window size is very small, due to a bug which
will be fixed by
https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/53. Once that
is fixed, its default window size will become huge due to the current
sizeHint value, which basically says "take up 75% of the screen space".
This may be somewhat excessive.

This commit reduces the sizeHint to a saner default size while still
being big enough to show all toolbar buttons.
This commit is contained in:
Nate Graham 2021-04-09 12:52:15 -06:00 committed by Albert Astals Cid
parent c4e33d0e79
commit 97264b534c

View file

@ -599,7 +599,11 @@ void Shell::slotShowMenubar()
QSize Shell::sizeHint() const
{
return QApplication::primaryScreen()->availableSize() * 0.75;
const QSize baseSize = QApplication::primaryScreen()->availableSize() * 0.6;
// Set an arbitrary yet sensible sane minimum size for very small screens;
// for example we don't want people using 1366x768 screens to get a tiny
// default window size of 820 x 460 which will elide most of the toolbar buttons.
return baseSize.expandedTo(QSize(1000, 700));
}
bool Shell::queryClose()