diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2022-11-11 18:32:11 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2022-11-11 18:32:11 -0700 |
commit | 25b306b7e1c83ecdeb135c8100c3089d9147cde7 (patch) | |
tree | b03a30f5912fa8e89ffc6b9d21a5a776f70a0dcf /launcher/ui/dialogs | |
parent | 9af1b00df52d974a53925345efcd5c047b7d041c (diff) | |
download | PrismLauncher-25b306b7e1c83ecdeb135c8100c3089d9147cde7.tar.gz PrismLauncher-25b306b7e1c83ecdeb135c8100c3089d9147cde7.tar.bz2 PrismLauncher-25b306b7e1c83ecdeb135c8100c3089d9147cde7.zip |
feat: mark folder paths as links
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/BlockedModsDialog.cpp | 9 | ||||
-rw-r--r-- | 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.<br/>" "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.<br/><br/>" - "Global Mods Folder: %1<br/>" - "Default Downloads Folder: %2")) + "Global Mods Folder: <a href=\"%1\">%1</a><br/>" + "Default Downloads Folder: <a href=\"%2\">%2</a>")) .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<br/>").arg(dir); + watching += QString("<a href=\"%1\">%1</a><br/>").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 @@ <property name="wordWrap"> <bool>true</bool> </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -86,6 +89,12 @@ <height>12</height> </size> </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + <property name="openLinks"> + <bool>false</bool> + </property> </widget> </item> <item> |