From edfd704d6f33934a22877ea06a474c8e0bfd94d7 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Wed, 15 Mar 2017 13:56:19 +0100 Subject: 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 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 #include +#include #include #include #include @@ -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("
" + QCoreApplication::applicationName() + "
", this); mainLayout->addWidget(appNameLabel); + auto websiteLabel = new QLabel("
https://swift.im/
", 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("
") + tr("Version %1") + "

" + QString(tr("Built with Qt %2")) + QString("
") + QString(tr("Running with Qt %3")) + "
").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 @@ ../resources/logo/logo-icon-16-win.png ../resources/logo/logo-chat-16.png ../resources/logo/logo-shaded-text.png + ../resources/logo/logo-icon.svg ../resources/icons/online.png ../resources/icons/connecting.mng ../resources/icons/away.png -- cgit v0.10.2-6-g49f6