mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-24 17:33:50 +03:00
recreate views when indicators update
This commit is contained in:
parent
a9310a3de3
commit
caefba4576
@ -65,6 +65,7 @@ Factory::Factory(QObject *parent)
|
||||
connect(KDirWatch::self(), &KDirWatch::dirty, this, [ & ](const QString & path) {
|
||||
if (m_watchedPaths.contains(path)) {
|
||||
reload();
|
||||
emit pluginsUpdated();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
static Latte::Types::ImportExportState importIndicatorFile(QString compressedFile);
|
||||
signals:
|
||||
void customPluginsChanged();
|
||||
void pluginsUpdated();
|
||||
|
||||
private:
|
||||
void reload();
|
||||
|
@ -62,6 +62,13 @@ Indicator::Indicator(Latte::View *parent)
|
||||
emit customPluginsChanged();
|
||||
});
|
||||
|
||||
connect(m_corona->indicatorFactory(), &Latte::Indicator::Factory::pluginsUpdated, [this]() {
|
||||
if (m_view && m_view->layout()) {
|
||||
m_view->layout()->recreateView(m_view->containment());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
connect(this, &Indicator::pluginChanged, [this]() {
|
||||
if ((m_type != "org.kde.latte.default") && m_type != "org.kde.latte.plasma") {
|
||||
setCustomType(m_type);
|
||||
|
Loading…
Reference in New Issue
Block a user