From 25b306b7e1c83ecdeb135c8100c3089d9147cde7 Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Fri, 11 Nov 2022 18:32:11 -0700 Subject: [PATCH] feat: mark folder paths as links Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> --- launcher/ui/dialogs/BlockedModsDialog.cpp | 9 ++++++--- launcher/ui/dialogs/BlockedModsDialog.ui | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp index 7f6b377b..a0dd1a10 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.cpp +++ b/launcher/ui/dialogs/BlockedModsDialog.cpp @@ -39,12 +39,15 @@ BlockedModsDialog::BlockedModsDialog(QWidget* parent, const QString& title, cons "are automatically checked for the downloaded mods and they will be copied to the instance if found.
" "Optionally, you may drag and drop the downloaded mods onto this dialog or add a folder to watch " "if you did not download the mods to a default location.

" - "Global Mods Folder: %1
" - "Default Downloads Folder: %2")) + "Global Mods Folder: %1
" + "Default Downloads Folder: %2")) .arg(APPLICATION->settings()->get("CentralModsDir").toString(), QStandardPaths::writableLocation(QStandardPaths::DownloadLocation))); ui->labelModsFound->setText(tr("Please download the missing mods.")); + // force all URL handeling as external + connect(ui->textBrowserWatched, &QTextBrowser::anchorClicked, this, [](const QUrl url) { QDesktopServices::openUrl(url); }); + setAcceptDrops(true); update(); @@ -118,7 +121,7 @@ void BlockedModsDialog::update() QString watching; for (auto& dir : m_watcher.directories()) { - watching += QString("%1
").arg(dir); + watching += QString("%1
").arg(dir); } ui->textBrowserWatched->setText(watching); diff --git a/launcher/ui/dialogs/BlockedModsDialog.ui b/launcher/ui/dialogs/BlockedModsDialog.ui index fb1036b7..88105178 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.ui +++ b/launcher/ui/dialogs/BlockedModsDialog.ui @@ -35,6 +35,9 @@ true + + true + @@ -86,6 +89,12 @@ 12 + + true + + + false +