Skip to content

Commit d56afd9

Browse files
committed
GUI - open app full screen on first ever launch
after the first launch we open app at the size it was last in when the app was closed
1 parent c9b91cb commit d56afd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/gui/qt/mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,9 +2304,9 @@ void MainWindow::createStatusBar()
23042304
*/
23052305
void MainWindow::restoreWindows() {
23062306
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "sonic-pi.net", "gui-settings");
2307-
2308-
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
2309-
QSize size = settings.value("size", QSize(400, 400)).toSize();
2307+
QRect rec = QApplication::desktop()->screenGeometry();
2308+
QPoint pos = settings.value("pos", QPoint(0, 0)).toPoint();
2309+
QSize size = settings.value("size", QSize(rec.width(), rec.height())).toSize();
23102310

23112311
int index = settings.value("workspace", 0).toInt();
23122312
if (index < tabs->count())

0 commit comments

Comments
 (0)