tycho: reformat about window

master
an 2019-06-14 13:23:16 -04:00
parent 8ff9d466e1
commit 840ac231d3
2 changed files with 26 additions and 32 deletions

View File

@ -61,8 +61,15 @@ void Menu::openAbout()
ui.setupUi(&dlg);
ui.labelVer->setText(tr(tychoVersion()));
ui.labelAuthors->setText(tr(tychoAuthors()).replace(':', '\n'));
auto text = ui.labelText->text();
text.replace("AUTHORS",
tr(tychoAuthors()).replace(':', ", ").toHtmlEscaped());
text.replace("HOMEPAGE", tr(tychoHomepage()));
text.replace("REPOSITORY", tr(tychoRepository()));
text.replace("VERSION", tr(tychoVersion()));
ui.labelText->setText(text);
connect(ui.btnLicense, &QPushButton::clicked, this, [&](){
openLicense(&dlg);

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>675</width>
<height>287</height>
<height>305</height>
</rect>
</property>
<property name="windowTitle">
@ -24,7 +24,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelImage">
<property name="text">
<string>&lt;img src=&quot;qrc:///tycho/misc/tycho2.png&quot;/&gt;</string>
</property>
@ -33,38 +33,25 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelText">
<property name="text">
<string>&lt;h1&gt;Tycho&lt;/h1&gt;</string>
<string>&lt;h1&gt;Tycho&lt;/h1&gt;
&lt;h4&gt;VERSION&lt;/h4&gt;
&lt;p&gt;Tycho is a map editor for Marathon 2 and Marathon Infinity.&lt;/p&gt;
&lt;p&gt;Marathon is Copyright © Bungie Software.&lt;/p&gt;
&lt;p&gt;Tycho is public domain software under the CC0 license.&lt;/p&gt;
&lt;p&gt;Home: &lt;a href=&quot;HOMEPAGE&quot;&gt;HOMEPAGE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Source code: &lt;a href=&quot;REPOSITORY&quot;&gt;REPOSITORY&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Made by AUTHORS&lt;/p&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelVer">
<property name="text">
<string>VERSION NUMBER</string>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Tycho is a map editor for Marathon 2 and Marathon Infinity.</string>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Marathon is Copyright © Bungie Software.
Tycho is public domain software under the CC0 license.</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelAuthors">
<property name="text">
<string>AUTHORS</string>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>