Qt: Enforce minimum size a bit better

This commit is contained in:
Vicki Pfau 2022-08-19 22:50:44 -07:00
parent a3acf4cb1f
commit a8dcf87e70
1 changed files with 6 additions and 2 deletions

View File

@ -141,10 +141,14 @@ Window::Window(CoreManager* manager, ConfigController* config, int playerId, QWi
});
#endif
#if defined(M_CORE_GBA)
resizeFrame(QSize(GBA_VIDEO_HORIZONTAL_PIXELS * i, GBA_VIDEO_VERTICAL_PIXELS * i));
QSize minimumSize = QSize(GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS);
#elif defined(M_CORE_GB)
resizeFrame(QSize(GB_VIDEO_HORIZONTAL_PIXELS * i, GB_VIDEO_VERTICAL_PIXELS * i));
QSize minimumSize = QSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS);
#endif
setMinimumSize(minimumSize);
if (i > 0) {
resizeFrame(minimumSize * i);
}
setLogo();
connect(this, &Window::shutdown, m_logView, &QWidget::hide);