diff options
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/AboutDialog.cpp | 9 | ||||
-rw-r--r-- | launcher/ui/dialogs/AboutDialog.ui | 13 | ||||
-rw-r--r-- | launcher/ui/dialogs/ModUpdateDialog.cpp | 15 | ||||
-rw-r--r-- | launcher/ui/dialogs/ProgressDialog.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/dialogs/VersionSelectDialog.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/dialogs/VersionSelectDialog.h | 2 |
6 files changed, 16 insertions, 27 deletions
diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp index cecda1df..a36e4a3d 100644 --- a/launcher/ui/dialogs/AboutDialog.cpp +++ b/launcher/ui/dialogs/AboutDialog.cpp @@ -73,17 +73,12 @@ QString getCreditsHtml() stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n"; stream << QString("<p>Sefa Eyeoglu (Scrumplex) %1</p>\n") .arg(getWebsite("https://scrumplex.net")); stream << QString("<p>dada513 %1</p>\n") .arg(getGitHub("dada513")); - stream << QString("<p>txtsd %1</p>\n") .arg(getGitHub("txtsd")); + stream << QString("<p>txtsd %1</p>\n") .arg(getWebsite("https://ihavea.quest")); stream << QString("<p>timoreo %1</p>\n") .arg(getGitHub("timoreo22")); stream << QString("<p>Ezekiel Smith (ZekeSmith) %1</p>\n") .arg(getGitHub("ZekeSmith")); stream << QString("<p>cozyGalvinism %1</p>\n") .arg(getGitHub("cozyGalvinism")); - stream << "<br />\n"; - - //: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Contributors" - stream << "<h3>" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n"; stream << QString("<p>DioEgizio %1</p>\n") .arg(getGitHub("DioEgizio")); stream << QString("<p>flowln %1</p>\n") .arg(getGitHub("flowln")); - stream << QString("<p>swirl %1</p>\n") .arg(getWebsite("https://swurl.xyz/")); stream << "<br />\n"; // TODO: possibly retrieve from git history at build time? @@ -97,7 +92,7 @@ QString getCreditsHtml() stream << "<br />\n"; stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n"; - stream << QString("<p>Boba %1</p>\n") .arg(getWebsite("https://cmdplusv.neocities.org/")); + stream << QString("<p>Boba %1</p>\n") .arg(getWebsite("https://bobaonline.neocities.org/")); stream << QString("<p>Davi Rafael %1</p>\n") .arg(getWebsite("https://auti.one/")); stream << QString("<p>Fulmine %1</p>\n") .arg(getWebsite("https://www.fulmine.xyz/")); stream << QString("<p>ely %1</p>\n") .arg(getGitHub("elyrodso")); diff --git a/launcher/ui/dialogs/AboutDialog.ui b/launcher/ui/dialogs/AboutDialog.ui index e0429321..4a9eef08 100644 --- a/launcher/ui/dialogs/AboutDialog.ui +++ b/launcher/ui/dialogs/AboutDialog.ui @@ -87,14 +87,11 @@ </property> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="versionLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> <property name="textInteractionFlags"> <set>Qt::TextSelectableByMouse</set> </property> @@ -167,7 +164,7 @@ </property> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="platformLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -183,7 +180,7 @@ </property> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="buildDateLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -199,7 +196,7 @@ </property> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="commitLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -215,7 +212,7 @@ </property> </widget> </item> - <item> + <item alignment="Qt::AlignHCenter"> <widget class="QLabel" name="channelLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> diff --git a/launcher/ui/dialogs/ModUpdateDialog.cpp b/launcher/ui/dialogs/ModUpdateDialog.cpp index 4171586e..cedd4a96 100644 --- a/launcher/ui/dialogs/ModUpdateDialog.cpp +++ b/launcher/ui/dialogs/ModUpdateDialog.cpp @@ -366,33 +366,28 @@ void ModUpdateDialog::appendMod(CheckUpdateTask::UpdatableMod const& info) auto changelog = new QTreeWidgetItem(changelog_item); auto changelog_area = new QTextBrowser(); + QString text = info.changelog; switch (info.provider) { case ModPlatform::Provider::MODRINTH: { HoeDown h; // HoeDown bug?: \n aren't converted to <br> - auto text = h.process(info.changelog.toUtf8()); + text = h.process(info.changelog.toUtf8()); // Don't convert if there's an HTML tag right after (Qt rendering weirdness) text.remove(QRegularExpression("(\n+)(?=<)")); text.replace('\n', "<br>"); - changelog_area->setHtml(text); break; } - case ModPlatform::Provider::FLAME: { - changelog_area->setHtml(info.changelog); + default: break; - } } + changelog_area->setHtml(text); changelog_area->setOpenExternalLinks(true); - changelog_area->setLineWrapMode(QTextBrowser::LineWrapMode::NoWrap); + changelog_area->setLineWrapMode(QTextBrowser::LineWrapMode::WidgetWidth); changelog_area->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded); - // HACK: Is there a better way of achieving this? - auto font_height = QFontMetrics(changelog_area->font()).height(); - changelog_area->setMaximumHeight((changelog_area->toPlainText().count(QRegularExpression("\n|<br>")) + 2) * font_height); - ui->modTreeWidget->setItemWidget(changelog, 0, changelog_area); ui->modTreeWidget->addTopLevelItem(item_top); diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp index 68dd4d17..05269f62 100644 --- a/launcher/ui/dialogs/ProgressDialog.cpp +++ b/launcher/ui/dialogs/ProgressDialog.cpp @@ -136,11 +136,13 @@ void ProgressDialog::onTaskStarted() {} void ProgressDialog::onTaskFailed(QString failure) { reject(); + hide(); } void ProgressDialog::onTaskSucceeded() { accept(); + hide(); } void ProgressDialog::changeStatus(const QString& status) diff --git a/launcher/ui/dialogs/VersionSelectDialog.cpp b/launcher/ui/dialogs/VersionSelectDialog.cpp index 70ef72d6..d7880334 100644 --- a/launcher/ui/dialogs/VersionSelectDialog.cpp +++ b/launcher/ui/dialogs/VersionSelectDialog.cpp @@ -120,7 +120,7 @@ void VersionSelectDialog::selectRecommended() m_versionWidget->selectRecommended(); } -BaseVersionPtr VersionSelectDialog::selectedVersion() const +BaseVersion::Ptr VersionSelectDialog::selectedVersion() const { return m_versionWidget->selectedVersion(); } diff --git a/launcher/ui/dialogs/VersionSelectDialog.h b/launcher/ui/dialogs/VersionSelectDialog.h index ed30d3f3..18a50cdb 100644 --- a/launcher/ui/dialogs/VersionSelectDialog.h +++ b/launcher/ui/dialogs/VersionSelectDialog.h @@ -44,7 +44,7 @@ public: int exec() override; - BaseVersionPtr selectedVersion() const; + BaseVersion::Ptr selectedVersion() const; void setCurrentVersion(const QString & version); void setFuzzyFilter(BaseVersionList::ModelRoles role, QString filter); |