aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2016-03-30 13:50:17 -0400
committerq5sys <jt@obs-sec.com>2016-03-30 13:50:17 -0400
commitf678f275a58840ad7fb61c1035e4e9c18307e703 (patch)
treec22a2f58315bb326d16dc308e5476685486031a3
parentMerge pull request #212 from q5sys/master (diff)
downloadlumina-f678f275a58840ad7fb61c1035e4e9c18307e703.tar.gz
lumina-f678f275a58840ad7fb61c1035e4e9c18307e703.tar.bz2
lumina-f678f275a58840ad7fb61c1035e4e9c18307e703.zip
Update MainUI.cpp
tentative replacement of initial size function
-rw-r--r--lumina-fm/MainUI.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index a9dda19e..f72f34bf 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -30,11 +30,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
//syncTimer->setInterval(200); //1/5 second (collect as many signals/slots as necessary
//syncTimer->setSingleShot(true);
//Reset the UI to the previously used size (if possible)
- if(DEBUG){ qDebug() << " - Reset window size"; }
- int height = settings->value("geometry/height",-1).toInt();
- if(height>100 && height <= QApplication::desktop()->availableGeometry(this).height()){ this->resize(this->width(), height); }
- int width = settings->value("geometry/width",-1).toInt();
- if(width>100 && width <= QApplication::desktop()->availableGeometry(this).width()){ this->resize(width, this->height() ); }
+QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize();
+ if(!orig.isEmpty() && orig.isValid()){
//initialize the non-ui widgets
if(DEBUG){ qDebug() << " - Tab Bar Setup"; }
tabBar = new QTabBar(this);
bgstack15