@@ -330,4 +333,18 @@ IconManager &IconManager::instance(const QPalette *palette)
return iconManager;
}
+QString aboutDialogAttribution()
+{
+ return QStringLiteral(
+ "Developed by " APP_AUTHOR
+ "
Fallback icons from KDE/Breeze project
Syncthing icons from Syncthing project
Using "
+ "icons from Fork "
+ "Awesome (see their license)
");
+}
+
+QImage aboutDialogImage()
+{
+ return renderSvgImage(makeSyncthingIcon(), QSize(128, 128)).toImage();
+}
+
} // namespace Data
diff --git a/model/syncthingicons.h b/model/syncthingicons.h
index 44059ac..4f8e0eb 100644
--- a/model/syncthingicons.h
+++ b/model/syncthingicons.h
@@ -12,6 +12,8 @@
QT_FORWARD_DECLARE_CLASS(QColor)
QT_FORWARD_DECLARE_CLASS(QPalette)
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Data {
@@ -215,6 +217,9 @@ inline const ForkAwesomeIcons &commonForkAwesomeIcons()
return IconManager::instance().commonForkAwesomeIcons();
}
+LIB_SYNCTHING_MODEL_EXPORT QString aboutDialogAttribution();
+LIB_SYNCTHING_MODEL_EXPORT QImage aboutDialogImage();
+
} // namespace Data
#endif // DATA_SYNCTHINGICONS_H
diff --git a/plasmoid/lib/syncthingapplet.cpp b/plasmoid/lib/syncthingapplet.cpp
index 51d26c3..0df38ef 100644
--- a/plasmoid/lib/syncthingapplet.cpp
+++ b/plasmoid/lib/syncthingapplet.cpp
@@ -370,12 +370,8 @@ void SyncthingApplet::showOwnDeviceId()
void SyncthingApplet::showAboutDialog()
{
if (!m_aboutDlg) {
- m_aboutDlg = new AboutDialog(nullptr, QStringLiteral(APP_NAME),
- QStringLiteral("Developed by " APP_AUTHOR "
Syncthing icons from Syncthing project
Using "
- "icons from Fork "
- "Awesome (see their license)
"),
- QStringLiteral(APP_VERSION), CppUtilities::applicationInfo.dependencyVersions, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION),
- renderSvgImage(makeSyncthingIcon(), QSize(128, 128)).toImage());
+ m_aboutDlg = new AboutDialog(nullptr, QStringLiteral(APP_NAME), aboutDialogAttribution(), QStringLiteral(APP_VERSION),
+ CppUtilities::applicationInfo.dependencyVersions, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION), aboutDialogImage());
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
m_aboutDlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
m_aboutDlg->setAttribute(Qt::WA_DeleteOnClose);
diff --git a/tray/gui/traywidget.cpp b/tray/gui/traywidget.cpp
index cf7071f..ade7fde 100644
--- a/tray/gui/traywidget.cpp
+++ b/tray/gui/traywidget.cpp
@@ -264,13 +264,8 @@ void TrayWidget::showAboutDialog()
s_dialogParent = new QWidget();
}
if (!s_aboutDlg) {
- s_aboutDlg = new AboutDialog(s_dialogParent, QString(),
- QStringLiteral(
- "Developed by " APP_AUTHOR
- "
Fallback icons from KDE/Breeze project
Syncthing icons from Syncthing project
Using "
- "icons from Fork "
- "Awesome (see their license)
"),
- QString(), {}, QStringLiteral(APP_URL), QString(), renderSvgImage(makeSyncthingIcon(), QSize(128, 128)).toImage());
+ s_aboutDlg = new AboutDialog(
+ s_dialogParent, QString(), aboutDialogAttribution(), QString(), {}, QStringLiteral(APP_URL), QString(), aboutDialogImage());
s_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
s_aboutDlg->setWindowIcon(QIcon(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));
}