Use Syncthing icon from ForkAwesome for buttons/menus
This should look more consistent than abusing the state-specific "idling" icon.
This commit is contained in:
parent
77f0a8d5ae
commit
3bf50fb414
|
@ -10,6 +10,6 @@ X-KDE-PluginInfo-Version=@META_VERSION_MAJOR@.@META_VERSION_MINOR@.@META_VERSION
|
|||
X-KDE-Library=@META_TARGET_NAME@
|
||||
X-KDE-Submenu=Syncthing
|
||||
|
||||
Icon=syncthingtray
|
||||
Icon=syncthing.fa
|
||||
ServiceTypes=KFileItemAction/Plugin
|
||||
MimeType=application/octet-stream;inode/directory
|
||||
|
|
|
@ -66,7 +66,7 @@ void SyncthingMenuAction::updateActionStatus()
|
|||
// handle case when already connected
|
||||
if (connection.isConnected()) {
|
||||
setText(tr("Syncthing"));
|
||||
setIcon(statusIcons().idling);
|
||||
setIcon(QIcon(QStringLiteral("syncthing.fa")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -140,11 +140,6 @@ QIcon SyncthingApplet::statusIcon() const
|
|||
return m_statusInfo.statusIcon();
|
||||
}
|
||||
|
||||
QIcon SyncthingApplet::syncthingIcon() const
|
||||
{
|
||||
return statusIcons().idling;
|
||||
}
|
||||
|
||||
QString SyncthingApplet::incomingTraffic() const
|
||||
{
|
||||
return trafficString(m_connection.totalIncomingTraffic(), m_connection.totalIncomingRate());
|
||||
|
|
|
@ -54,7 +54,6 @@ class SyncthingApplet : public Plasma::Applet {
|
|||
Q_PROPERTY(QString statusText READ statusText NOTIFY connectionStatusChanged)
|
||||
Q_PROPERTY(QString additionalStatusText READ additionalStatusText NOTIFY connectionStatusChanged)
|
||||
Q_PROPERTY(QIcon statusIcon READ statusIcon NOTIFY connectionStatusChanged)
|
||||
Q_PROPERTY(QIcon syncthingIcon READ syncthingIcon NOTIFY settingsChanged)
|
||||
Q_PROPERTY(QString incomingTraffic READ incomingTraffic NOTIFY trafficChanged)
|
||||
Q_PROPERTY(bool hasIncomingTraffic READ hasIncomingTraffic NOTIFY trafficChanged)
|
||||
Q_PROPERTY(QString outgoingTraffic READ outgoingTraffic NOTIFY trafficChanged)
|
||||
|
|
|
@ -422,7 +422,7 @@ ColumnLayout {
|
|||
id: webUIButton
|
||||
// use PlasmaCore.IconItem for the icon because I wouldn't know how to show the QIcon otherwise
|
||||
contentItem: PlasmaCore.IconItem {
|
||||
source: plasmoid.nativeInterface.syncthingIcon
|
||||
source: plasmoid.nativeInterface.loadForkAwesomeIcon("syncthing")
|
||||
}
|
||||
// set preferred size so the tool button is displayed consistently with the previous one despite using PlasmaCore.IconItem
|
||||
Layout.preferredWidth: settingsButton.width
|
||||
|
|
|
@ -517,7 +517,6 @@ void TrayWidget::applySettings(const QString &connectionConfig)
|
|||
m_dlModel.setBrightColors(brightColors);
|
||||
m_recentChangesModel.setBrightColors(brightColors);
|
||||
IconManager::instance().applySettings(&settings.icons.status, settings.icons.distinguishTrayIcons ? &settings.icons.tray : nullptr);
|
||||
m_ui->webUiPushButton->setIcon(statusIcons().idling);
|
||||
|
||||
// update status icon and text of tray icon because reconnect interval might have changed
|
||||
if (m_menu && m_menu->icon()) {
|
||||
|
|
|
@ -129,6 +129,9 @@
|
|||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>syncthing.fa</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
Loading…
Reference in New Issue