Commit fd45f39d authored by dogmaphobic's avatar dogmaphobic

Sensible initial window size.

parent 8aea612f
...@@ -235,15 +235,17 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) ...@@ -235,15 +235,17 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
else else
{ {
// Adjust the size // Adjust the size
const int screenWidth = QApplication::desktop()->width(); QScreen* scr = QApplication::primaryScreen();
const int screenHeight = QApplication::desktop()->height(); QSize scrSize = scr->availableSize();
if (screenWidth < 1500) if (scrSize.width() <= 1280)
{ {
resize(screenWidth, screenHeight - 80); resize(scrSize.width(), scrSize.height());
} }
else else
{ {
resize(screenWidth*0.67f, qMin(screenHeight, (int)(screenWidth*0.67f*0.67f))); int w = scrSize.width() > 1600 ? 1600 : scrSize.width();
int h = scrSize.height() > 800 ? 800 : scrSize.height();
resize(w, h);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment