diff --git a/src/widgets/settingspages/emotespage.cpp b/src/widgets/settingspages/emotespage.cpp index 026c00ee6..b5788815b 100644 --- a/src/widgets/settingspages/emotespage.cpp +++ b/src/widgets/settingspages/emotespage.cpp @@ -5,6 +5,7 @@ namespace chatterino { namespace widgets { namespace settingspages { + EmotesPage::EmotesPage() : SettingsPage("Emotes", ":/images/emote.svg") { @@ -22,6 +23,7 @@ EmotesPage::EmotesPage() layout->addStretch(1); } + } // namespace settingspages } // namespace widgets } // namespace chatterino diff --git a/src/widgets/settingspages/logspage.cpp b/src/widgets/settingspages/logspage.cpp index e99327e19..138df8e1e 100644 --- a/src/widgets/settingspages/logspage.cpp +++ b/src/widgets/settingspages/logspage.cpp @@ -1,4 +1,5 @@ #include "logspage.hpp" +#include "singletons/pathmanager.hpp" #include #include @@ -9,6 +10,16 @@ namespace chatterino { namespace widgets { namespace settingspages { +inline QString CreateLink(const QString &url, bool file = false) +{ + if (file) { + return QString("" + url + + ""); + } + + return QString("" + url + ""); +} + LogsPage::LogsPage() : SettingsPage("Logs", "") { @@ -16,13 +27,16 @@ LogsPage::LogsPage() util::LayoutCreator layoutCreator(this); auto layout = layoutCreator.emplace().withoutMargin(); - { - auto form = layout.emplace(); + singletons::PathManager &pathManager = singletons::PathManager::getInstance(); + auto logPath = pathManager.logsFolderPath; - // clang-format off - form->addRow("Enabled:", this->createCheckBox("Enable logging", settings.enableLogging)); - // clang-format on - } + auto created = layout.emplace(); + created->setText("Logs are saved to " + CreateLink(logPath, true)); + created->setTextFormat(Qt::RichText); + created->setTextInteractionFlags(Qt::TextBrowserInteraction | Qt::LinksAccessibleByKeyboard | + Qt::LinksAccessibleByKeyboard); + created->setOpenExternalLinks(true); + layout.append(this->createCheckBox("Enable logging", settings.enableLogging)); layout->addStretch(1); }