Don't abuse scanning icon to get default logo

This commit is contained in:
Martchus 2019-05-19 18:04:28 +02:00
parent 05da0465a7
commit 72b72b26ae
4 changed files with 6 additions and 4 deletions

View File

@ -96,7 +96,7 @@ void SyncthingFileItemActionStaticData::showAboutDialog()
auto *const aboutDialog
= new AboutDialog(nullptr, QStringLiteral(APP_NAME), QStringLiteral(APP_AUTHOR "\nSyncthing icons from Syncthing project"),
QStringLiteral(APP_VERSION), ApplicationUtilities::applicationInfo.dependencyVersions, QStringLiteral(APP_URL),
QStringLiteral(APP_DESCRIPTION), QImage(statusIcons().scanninig.pixmap(128).toImage()));
QStringLiteral(APP_DESCRIPTION), renderSvgImage(makeSyncthingIcon()).toImage());
aboutDialog->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
aboutDialog->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
aboutDialog->setAttribute(Qt::WA_DeleteOnClose);

View File

@ -65,7 +65,7 @@ void SyncthingMenuAction::updateActionStatus()
// handle case when already connected
if (connection.isConnected()) {
setText(tr("Syncthing"));
setIcon(statusIcons().scanninig);
setIcon(renderSvgImage(makeSyncthingIcon(), QSize(16, 16)));
return;
}

View File

@ -48,7 +48,9 @@ inline GradientColor::GradientColor(const QColor &start, const QColor &end)
{
}
QByteArray LIB_SYNCTHING_MODEL_EXPORT makeSyncthingIcon(const GradientColor &gradientColor, StatusEmblem statusEmblem);
QByteArray LIB_SYNCTHING_MODEL_EXPORT makeSyncthingIcon(
const GradientColor &gradientColor = GradientColor{ QStringLiteral("#26B6DB"), QStringLiteral("#0882C8") },
StatusEmblem statusEmblem = StatusEmblem::None);
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QString &path, const QSize &size = QSize(128, 128), int margin = 0);
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QByteArray &contents, const QSize &size = QSize(128, 128), int margin = 0);
QByteArray LIB_SYNCTHING_MODEL_EXPORT loadFontAwesomeIcon(const QString &iconName, const QColor &color, bool solid = true);

View File

@ -313,7 +313,7 @@ void SyncthingApplet::showAboutDialog()
"icons from <a href=\"https://fontawesome.com\">Font "
"Awesome</a> (see <a href=\"https://fontawesome.com/license\">their license</a>)</p>"),
QStringLiteral(APP_VERSION), ApplicationUtilities::applicationInfo.dependencyVersions, QStringLiteral(APP_URL),
QStringLiteral(APP_DESCRIPTION), QImage(statusIcons().scanninig.pixmap(128).toImage()));
QStringLiteral(APP_DESCRIPTION), renderSvgImage(makeSyncthingIcon()).toImage());
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
m_aboutDlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
m_aboutDlg->setAttribute(Qt::WA_DeleteOnClose);