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
|
QSize ComicVineDialog::sizeHint() const
|
||||||
{
|
{
|
||||||
int heightDesktopResolution = QApplication::desktop()->screenGeometry().height();
|
QScreen *screen = window()->screen();
|
||||||
int widthDesktopResolution = QApplication::desktop()->screenGeometry().width();
|
if (screen == nullptr) {
|
||||||
|
screen = QApplication::screens().constFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
int heightDesktopResolution = screen->geometry().height();
|
||||||
|
int widthDesktopResolution = screen->geometry().width();
|
||||||
|
|
||||||
int height, width;
|
int height, width;
|
||||||
height = qMax(529, static_cast<int>(heightDesktopResolution * 0.5));
|
height = qMax(529, static_cast<int>(heightDesktopResolution * 0.5));
|
||||||
width = height * 1.65;
|
width = height * 1.65;
|
||||||
|
Loading…
Reference in New Issue
Block a user