Ensure Fork Awesome icons are re-rendered on device pixel ratio change
This commit is contained in:
parent
abf1ad6c5a
commit
43caad8676
|
@ -161,6 +161,7 @@ public:
|
|||
|
||||
public Q_SLOTS:
|
||||
void setPalette(const QPalette &palette);
|
||||
void update();
|
||||
|
||||
Q_SIGNALS:
|
||||
void statusIconsChanged(const Data::StatusIcons &newStatusIcons, const Data::StatusIcons &newTrayIcons);
|
||||
|
@ -210,6 +211,12 @@ inline const ForkAwesomeIcons &IconManager::commonForkAwesomeIcons() const
|
|||
return m_commonForkAwesomeIcons;
|
||||
}
|
||||
|
||||
inline void IconManager::update()
|
||||
{
|
||||
emit statusIconsChanged(m_statusIcons, m_trayIcons);
|
||||
emit forkAwesomeIconsChanged(m_commonForkAwesomeIcons);
|
||||
}
|
||||
|
||||
inline const StatusIcons &statusIcons()
|
||||
{
|
||||
return IconManager::instance().statusIcons();
|
||||
|
|
|
@ -639,6 +639,11 @@ bool TrayWidget::event(QEvent *event)
|
|||
m_menu->icon()->updateStatusIconAndText();
|
||||
}
|
||||
break;
|
||||
case QEvent::DevicePixelRatioChange:
|
||||
setLabelPixmaps();
|
||||
setTrafficPixmaps(true);
|
||||
IconManager::instance().update();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue