mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Do not use screengeometry
This commit is contained in:
parent
36227a1354
commit
ec95f8f5c3
@ -209,8 +209,14 @@ void ComicVineDialog::setComics(const QList<ComicDB> &comics)
|
||||
|
||||
QSize ComicVineDialog::sizeHint() const
|
||||
{
|
||||
int heightDesktopResolution = QApplication::desktop()->screenGeometry().height();
|
||||
int widthDesktopResolution = QApplication::desktop()->screenGeometry().width();
|
||||
QScreen *screen = window()->screen();
|
||||
if (screen == nullptr) {
|
||||
screen = QApplication::screens().constFirst();
|
||||
}
|
||||
|
||||
int heightDesktopResolution = screen->geometry().height();
|
||||
int widthDesktopResolution = screen->geometry().width();
|
||||
|
||||
int height, width;
|
||||
height = qMax(529, static_cast<int>(heightDesktopResolution * 0.5));
|
||||
width = height * 1.65;
|
||||
|
Loading…
Reference in New Issue
Block a user