diff options
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 7 |
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); |