aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MainUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r--lumina-fm/MainUI.cpp5
1 files changed, 4 insertions, 1 deletions
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);
bgstack15