From f1d4e95a0be80f6ea93dde4de4b5f356058807b1 Mon Sep 17 00:00:00 2001 From: q5sys Date: Wed, 30 Mar 2016 13:52:16 -0400 Subject: Update MainUI.cpp --- lumina-fm/MainUI.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 48f7a6b2..70d5ab08 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -35,7 +35,10 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); //Make sure the old size is larger than the default size hint if(orig.width() < this->sizeHint().width()){ orig.setWidth(this->sizeHint().width()); } if(orig.height() < this->sizeHint().height()){ orig.setHeight(this->sizeHint().height()); } - + //Also ensure the old size is smaller than the current screen size + QSize screen = QApplication::desktop()->availableGeometry(this).size(); + if(orig.width() > screen.width()){ orig.setWidth(screen.width()); } + if(orig.height() > screen.height()){ orig.setHeight(screen.height()); } //initialize the non-ui widgets if(DEBUG){ qDebug() << " - Tab Bar Setup"; } tabBar = new QTabBar(this); -- cgit