diff options
author | q5sys <jt@obs-sec.com> | 2016-03-30 13:52:16 -0400 |
---|---|---|
committer | q5sys <jt@obs-sec.com> | 2016-03-30 13:52:16 -0400 |
commit | f1d4e95a0be80f6ea93dde4de4b5f356058807b1 (patch) | |
tree | 11b8de5259e4c3121f5e3f6615fd88bd8264e64b /lumina-fm/MainUI.cpp | |
parent | Update MainUI.cpp (diff) | |
download | lumina-f1d4e95a0be80f6ea93dde4de4b5f356058807b1.tar.gz lumina-f1d4e95a0be80f6ea93dde4de4b5f356058807b1.tar.bz2 lumina-f1d4e95a0be80f6ea93dde4de4b5f356058807b1.zip |
Update MainUI.cpp
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 5 |
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); |