aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/NewsDialog.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-10-11 16:11:08 -0300
committerflow <flowlnlnln@gmail.com>2022-10-11 16:11:08 -0300
commitfda3f1352e203bc119f092e30b25356345342c18 (patch)
tree6fa49da4edf9cfe9b221bacf720c427ca33fdc12 /launcher/ui/dialogs/NewsDialog.cpp
parentd194b02e28132df3ea3da961299e969614b8a185 (diff)
downloadPrismLauncher-fda3f1352e203bc119f092e30b25356345342c18.tar.gz
PrismLauncher-fda3f1352e203bc119f092e30b25356345342c18.tar.bz2
PrismLauncher-fda3f1352e203bc119f092e30b25356345342c18.zip
feat: add image support for the news reader :^)
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/NewsDialog.cpp')
-rw-r--r--launcher/ui/dialogs/NewsDialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/NewsDialog.cpp b/launcher/ui/dialogs/NewsDialog.cpp
index d3b21627..e1b5dd74 100644
--- a/launcher/ui/dialogs/NewsDialog.cpp
+++ b/launcher/ui/dialogs/NewsDialog.cpp
@@ -20,7 +20,9 @@ NewsDialog::NewsDialog(QList<NewsEntryPtr> entries, QWidget* parent) : QDialog(p
auto article_entry = m_entries.constFind(first_item->text()).value();
ui->articleTitleLabel->setText(QString("<a href='%1'>%2</a>").arg(article_entry->link, first_item->text()));
+
ui->currentArticleContentBrowser->setText(article_entry->content);
+ ui->currentArticleContentBrowser->flush();
}
NewsDialog::~NewsDialog()
@@ -33,7 +35,9 @@ void NewsDialog::selectedArticleChanged(const QString& new_title)
auto const& article_entry = m_entries.constFind(new_title).value();
ui->articleTitleLabel->setText(QString("<a href='%1'>%2</a>").arg(article_entry->link, new_title));
+
ui->currentArticleContentBrowser->setText(article_entry->content);
+ ui->currentArticleContentBrowser->flush();
}
void NewsDialog::toggleArticleList()