Skip to content

Commit 61ea567

Browse files
committed
GUI - improve styling of startup window
1 parent d15ce53 commit 61ea567

File tree

2 files changed

+37
-28
lines changed

2 files changed

+37
-28
lines changed

app/gui/qt/html/startup.html

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
2+
<html>
3+
<body class="info">
4+
<center>
5+
<img src="../images/logo.png" height="214dx" width="262dx"/>
26

3-
<body class="info">
4-
<center>
5-
<img src="../images/logo-smaller.png" height="268" width="328"/>
7+
<p style="font-size:50dx;color: white;background-color: #99004A;">Welcome!</p>
68

7-
<h1>Welcome!</h1>
9+
<p>
10+
This is Sonic Pi<br/>
11+
the live coding music environment
12+
</p>
813

9-
<p>
10-
This is Sonic Pi<br/>
11-
the live coding music environment
12-
</p>
14+
<p>
15+
To get started please follow the<br/>
16+
tutorial in the help system below<br/>
17+
(which you can always access via the Help button)
18+
</p>
1319

14-
<p>
15-
To get started please follow the<br/>
16-
tutorial in the help system below<br/>
17-
(which you can always access via the Help button)
18-
</p>
19-
20-
<p>
21-
<em>and remember...</em><br/>
22-
with live coding<br/>
23-
there are no mistakes<br/>
24-
only opportunities
25-
</p>
20+
<p>
21+
<em>and remember...</em><br/>
22+
with live coding<br/>
23+
there are no mistakes<br/>
24+
only opportunities
25+
</p>
2626

27-
<p class="highlight">
28-
Have fun and share your code<br/>
29-
for others to jam with
30-
</p>
31-
</center>
32-
</body>
27+
<p class="highlight">
28+
Have fun and share your code<br/>
29+
for others to jam with
30+
</p>
31+
</center>
32+
</body>
33+
</html>

app/gui/qt/mainwindow.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,21 @@ void MainWindow::showWelcomeScreen() {
456456
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "sonic-pi.net", "gui-settings");
457457
if(settings.value("first_time", 1).toInt() == 1) {
458458
QTextBrowser* startupPane = new QTextBrowser;
459-
startupPane->setFixedSize(ScaleHeightForDPI(600), ScaleHeightForDPI(615));
459+
startupPane->setFixedSize(ScaleHeightForDPI(600), ScaleHeightForDPI(650));
460460
startupPane->setWindowIcon(QIcon(":images/icon-smaller.png"));
461461
startupPane->setWindowTitle(tr("Welcome to Sonic Pi"));
462462
addUniversalCopyShortcuts(startupPane);
463463
QString styles = ScalePxInStyleSheet(readFile(":/theme/light/doc-styles.css"));
464464
startupPane->document()->setDefaultStyleSheet(styles);
465-
startupPane->setSource(QUrl("qrc:///html/startup.html"));
465+
QFile file(":/html/startup.html");
466+
file.open(QFile::ReadOnly | QFile::Text);
467+
QTextStream st(&file);
468+
st.setCodec("UTF-8");
469+
QString source = st.readAll();
470+
source = source.replace("214dx", QString("%1").arg(ScaleHeightForDPI(214)));
471+
source = source.replace("262dx", QString("%1").arg(ScaleHeightForDPI(262)));
472+
source = source.replace("50dx", QString("%1px").arg(ScaleHeightForDPI(32)));
473+
startupPane->setHtml(source);
466474
docWidget->show();
467475
docsCentral->setCurrentIndex(0);
468476
helpLists[0]->setCurrentRow(0);

0 commit comments

Comments
 (0)