diff options
Diffstat (limited to 'Swift/QtUI/QtAboutWidget.cpp')
-rw-r--r-- | Swift/QtUI/QtAboutWidget.cpp | 10 |
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 @@ -1,80 +1,88 @@ /* * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swift/QtUI/QtAboutWidget.h> #include <QCoreApplication> +#include <QDesktopServices> #include <QFile> #include <QIcon> #include <QLabel> #include <QProgressBar> #include <QPushButton> #include <QTextEdit> #include <QTextStream> #include <QVBoxLayout> #include <QtGlobal> #include <Swiften/Base/Log.h> #include <Swiften/Base/Platform.h> #include <SwifTools/AutoUpdater/AutoUpdater.h> #include <Swift/QtUI/QtSwiftUtil.h> #include <Swift/QtUI/QtUISettingConstants.h> #include <Swift/QtUI/QtUpdateFeedSelectionDialog.h> #include <Swift/QtUI/SwiftUpdateFeeds.h> namespace Swift { QtAboutWidget::QtAboutWidget(SettingsProvider* settingsProvider, AutoUpdater* autoUpdater) : QDialog(), settingsProvider_(settingsProvider), autoUpdater_(autoUpdater) { #ifndef Q_OS_MAC setWindowTitle(QString(tr("About %1")).arg("Swift")); #endif setWindowIcon(QIcon(":/logo-icon-16.png")); resize(180, 240); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setAlignment(Qt::AlignHCenter); 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); if (autoUpdater_) { settingsChangedConnection_ = settingsProvider_->onSettingChanged.connect([&](const std::string& path) { if (path == QtUISettingConstants::SOFTWARE_UPDATE_CHANNEL.getKey() || path == QtUISettingConstants::ENABLE_SOFTWARE_UPDATES.getKey()) { updateUpdateInfo(); } }); autoUpdaterChangeConnection_ = autoUpdater_->onUpdateStateChanged.connect([&](AutoUpdater::State /*updatedState*/) { updateUpdateInfo(); }); } updateChannelInfoLabel_ = new QLabel("", this); updateChannelInfoLabel_->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard | Qt::LinksAccessibleByMouse); connect(updateChannelInfoLabel_, SIGNAL(linkActivated(const QString &)), this, SLOT(handleChangeUpdateChannelClicked())); mainLayout->addWidget(updateChannelInfoLabel_); updateStateInfoLabel_ = new QLabel("", this); mainLayout->addWidget(updateStateInfoLabel_); updateProgressBar_ = new QProgressBar(this); updateProgressBar_->setMinimum(0); updateProgressBar_->setMaximum(0); mainLayout->addWidget(updateProgressBar_); updateUpdateInfo(); |