diff options
author | Tobias Markmann <tm@ayena.de> | 2017-03-15 12:56:19 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2017-03-15 14:26:14 (GMT) |
commit | edfd704d6f33934a22877ea06a474c8e0bfd94d7 (patch) | |
tree | c6dc5a6da149344f3cd3fec9bee9cbf27cc2d65b /Swift | |
parent | e7d414e233b46e3ede399cb7ef385b0d078cafc9 (diff) | |
download | swift-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')
-rw-r--r-- | Swift/QtUI/QtAboutWidget.cpp | 10 | ||||
-rw-r--r-- | Swift/QtUI/Swift.qrc | 1 |
2 files changed, 10 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); diff --git a/Swift/QtUI/Swift.qrc b/Swift/QtUI/Swift.qrc index cfb0fec..b04503c 100644 --- a/Swift/QtUI/Swift.qrc +++ b/Swift/QtUI/Swift.qrc @@ -5,6 +5,7 @@ <file alias="logo-icon-16-win.png">../resources/logo/logo-icon-16-win.png</file> <file alias="logo-chat-16.png">../resources/logo/logo-chat-16.png</file> <file alias="logo-shaded-text.png">../resources/logo/logo-shaded-text.png</file> + <file alias="logo-icon.svg">../resources/logo/logo-icon.svg</file> <file alias="icons/online.png">../resources/icons/online.png</file> <file alias="icons/connecting.mng">../resources/icons/connecting.mng</file> <file alias="icons/away.png">../resources/icons/away.png</file> |