From 0b437b3bfb77c76edd8f3893606bcb511424f33d Mon Sep 17 00:00:00 2001
From: Jonas Kvinge
Date: Wed, 12 Aug 2020 17:27:08 +0200
Subject: [PATCH] Use standard text color for links in about
Fixes #508
---
src/dialogs/about.cpp | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/dialogs/about.cpp b/src/dialogs/about.cpp
index 4c276e492..c59470b31 100644
--- a/src/dialogs/about.cpp
+++ b/src/dialogs/about.cpp
@@ -41,6 +41,7 @@ About::About(QWidget *parent):QDialog(parent) {
ui_.setupUi(this);
setWindowFlags(this->windowFlags()|Qt::WindowStaysOnTopHint);
+ setWindowTitle(tr("About Strawberry"));
strawberry_authors_ \
<< Person("Jonas Kvinge", "jonas@jkvinge.net");
@@ -85,17 +86,14 @@ About::About(QWidget *parent):QDialog(parent) {
<< Person("Thomas Pierson", "contact@thomaspierson.fr")
<< Person("Fabio Loli", "fabio.lolix@gmail.com");
- QString Title(tr("About Strawberry"));
-
QFont title_font;
title_font.setBold(true);
title_font.setPointSize(title_font.pointSize() + 4);
- setWindowTitle(Title);
-
ui_.label_title->setFont(title_font);
- ui_.label_title->setText(Title);
+ ui_.label_title->setText(windowTitle());
ui_.label_text->setText(MainHtml());
+ ui_.text_contributors->document()->setDefaultStyleSheet(QString("a {color: %1; }").arg(palette().text().color().name()));
ui_.text_contributors->setText(ContributorsHtml());
ui_.buttonBox->button(QDialogButtonBox::Close)->setShortcut(QKeySequence::Close);
@@ -117,15 +115,18 @@ QString About::MainHtml() const {
ret += QString("
");
ret += QString("");
- ret += tr("Strawberry is free software released under GPL. The source code is available on %1").arg("GitHub.");
+ ret += tr("Strawberry is free software released under GPL. The source code is available on %1").arg(QString("GitHub.").arg(palette().text().color().name()));
ret += QString("
");
- ret += tr("You should have received a copy of the GNU General Public License along with this program. If not, see %1").arg("http://www.gnu.org/licenses/");
+ ret += tr("You should have received a copy of the GNU General Public License along with this program. If not, see %1").arg(QString("http://www.gnu.org/licenses/").arg(palette().text().color().name()));
ret += QString("
");
ret += QString("");
ret += tr("If you like Strawberry and can make use of it, consider sponsoring or donating.");
ret += QString("
");
- ret += tr("You can sponsor the author on %1. You can also make a one-time payment through %2.").arg("GitHub sponsors").arg("paypal.me/jonaskvinge");
+ ret += tr("You can sponsor the author on %1. You can also make a one-time payment through %2.")
+ .arg(QString("GitHub sponsors").arg(palette().text().color().name()))
+ .arg(QString("paypal.me/jonaskvinge").arg(palette().text().color().name()));
+
ret += QString("
");
return ret;