Commit 1b4d376f authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Better default window size on first startup

parent 7d81a4b9
......@@ -511,10 +511,13 @@ void MainWindow::init()
setupGUI(KXmlGuiWindow::ToolBar | KXmlGuiWindow::StatusBar | KXmlGuiWindow::Save | KXmlGuiWindow::Create);
if (firstRun) {
if (QScreen *current = QApplication::primaryScreen()) {
if (current->availableSize().height() < 1000) {
int screenHeight = current->availableSize().height();
if (screenHeight < 1000) {
resize(current->availableSize());
} else {
} else if (screenHeight < 2000) {
resize(current->availableSize() / 1.2);
} else {
resize(current->availableSize() / 1.6);
}
}
}
......
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