mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
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:
parent
c4e33d0e79
commit
97264b534c
1 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue