summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-03-15 12:56:19 (GMT)
committerKevin Smith <kevin.smith@isode.com>2017-03-15 14:26:14 (GMT)
commitedfd704d6f33934a22877ea06a474c8e0bfd94d7 (patch)
treec6dc5a6da149344f3cd3fec9bee9cbf27cc2d65b /Swift/QtUI/QtAboutWidget.cpp
parente7d414e233b46e3ede399cb7ef385b0d078cafc9 (diff)
downloadswift-edfd704d6f33934a22877ea06a474c8e0bfd94d7.zip
swift-edfd704d6f33934a22877ea06a474c8e0bfd94d7.tar.bz2
Add link to https://swift.im/ to about dialog
In addition, fix display of Swift icon in about dialog. Test-Information: Build on macOS 10.12.3 with Qt 5.4.2 and verified that the icon is display in the about dialog and clicking the link opens the Swift website in the default browser. Change-Id: If13e03bfa976354aeba1de9be4bcb1edabaa5403
Diffstat (limited to 'Swift/QtUI/QtAboutWidget.cpp')
-rw-r--r--Swift/QtUI/QtAboutWidget.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp
index a2aa65c..2db0c9d 100644
--- a/Swift/QtUI/QtAboutWidget.cpp
+++ b/Swift/QtUI/QtAboutWidget.cpp
@@ -7,6 +7,7 @@
#include <Swift/QtUI/QtAboutWidget.h>
#include <QCoreApplication>
+#include <QDesktopServices>
#include <QFile>
#include <QIcon>
#include <QLabel>
@@ -41,13 +42,20 @@ QtAboutWidget::QtAboutWidget(SettingsProvider* settingsProvider, AutoUpdater* au
setLayout(mainLayout);
QLabel* iconLabel = new QLabel(this);
- iconLabel->setPixmap(QIcon(":/logo-shaded-text.256.png").pixmap(90, 90));
+ iconLabel->setPixmap(QIcon(":/logo-icon.svg").pixmap(90, 90));
iconLabel->setAlignment(Qt::AlignHCenter);
mainLayout->addWidget(iconLabel);
QLabel* appNameLabel = new QLabel("<center><font size='+1'><b>" + QCoreApplication::applicationName() + "</b></font></center>", this);
mainLayout->addWidget(appNameLabel);
+ auto websiteLabel = new QLabel("<center><font size='-1'><a href='https://swift.im/'>https://swift.im/</a></font></center>", this);
+ websiteLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard);
+ connect(websiteLabel, &QLabel::linkActivated, [](){
+ QDesktopServices::openUrl(QUrl("https://swift.im/"));
+ });
+ mainLayout->addWidget(websiteLabel);
+
QLabel* versionLabel = new QLabel((QString("<center><font size='-1'>") + tr("Version %1") + "</font></center><center><font size='-1'><br/>" + QString(tr("Built with Qt %2")) + QString("<br/>") + QString(tr("Running with Qt %3")) + "</font></center>").arg(QCoreApplication::applicationVersion()).arg(QT_VERSION_STR).arg(qVersion()));
versionLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
mainLayout->addWidget(versionLabel);