aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-10-19 14:28:29 +0200
committerGitHub <noreply@github.com>2022-10-19 14:28:29 +0200
commit4e08f282469071074f390d2767184560a4ece6bd (patch)
tree073c82787221001f3e04cb734cd05b6148911f44 /launcher/ui/dialogs
parent46c57e120f50084b310879286a2774334b53d2af (diff)
parentfda3f1352e203bc119f092e30b25356345342c18 (diff)
downloadPrismLauncher-4e08f282469071074f390d2767184560a4ece6bd.tar.gz
PrismLauncher-4e08f282469071074f390d2767184560a4ece6bd.tar.bz2
PrismLauncher-4e08f282469071074f390d2767184560a4ece6bd.zip
Merge pull request #31 from flowln/who_needs_webview
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r--launcher/ui/dialogs/NewsDialog.cpp4
-rw-r--r--launcher/ui/dialogs/NewsDialog.ui9
2 files changed, 12 insertions, 1 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()
diff --git a/launcher/ui/dialogs/NewsDialog.ui b/launcher/ui/dialogs/NewsDialog.ui
index 2aaa08f1..08f35a0b 100644
--- a/launcher/ui/dialogs/NewsDialog.ui
+++ b/launcher/ui/dialogs/NewsDialog.ui
@@ -49,7 +49,7 @@
</widget>
</item>
<item>
- <widget class="QTextBrowser" name="currentArticleContentBrowser">
+ <widget class="ProjectDescriptionPage" name="currentArticleContentBrowser">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
@@ -91,6 +91,13 @@
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>ProjectDescriptionPage</class>
+ <extends>QTextBrowser</extends>
+ <header>ui/widgets/ProjectDescriptionPage.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections>
<connection>