Skip to content

Commit d351c6b

Browse files
committed
GUI - scale welcome window and ensure it's on top at first launch
1 parent d56afd9 commit d351c6b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/gui/qt/mainwindow.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ MainWindow::MainWindow(QApplication &app, bool i18n, QSplashScreen* splash)
232232
timer->start(1000);
233233
splashClose();
234234
showWindow();
235-
showWelcomeScreen();
236235
app.processEvents();
237236
std::cout << "[GUI] - boot sequence completed." << std::endl;
238237

@@ -244,6 +243,8 @@ MainWindow::MainWindow(QApplication &app, bool i18n, QSplashScreen* splash)
244243
toggleOSCServer(1);
245244

246245
app.setActiveWindow(tabs->currentWidget());
246+
showWelcomeScreen();
247+
247248

248249
}
249250

@@ -455,7 +456,7 @@ void MainWindow::showWelcomeScreen() {
455456
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "sonic-pi.net", "gui-settings");
456457
if(settings.value("first_time", 1).toInt() == 1) {
457458
QTextBrowser* startupPane = new QTextBrowser;
458-
startupPane->setFixedSize(600, 615);
459+
startupPane->setFixedSize(ScaleHeightForDPI(600), ScaleHeightForDPI(615));
459460
startupPane->setWindowIcon(QIcon(":images/icon-smaller.png"));
460461
startupPane->setWindowTitle(tr("Welcome to Sonic Pi"));
461462
addUniversalCopyShortcuts(startupPane);
@@ -466,6 +467,8 @@ void MainWindow::showWelcomeScreen() {
466467
docsCentral->setCurrentIndex(0);
467468
helpLists[0]->setCurrentRow(0);
468469
startupPane->show();
470+
startupPane->raise();
471+
startupPane->activateWindow();
469472
}
470473
}
471474

0 commit comments

Comments
 (0)