mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 01:33:50 +03:00
layout:update default color scheme ref properly
This commit is contained in:
parent
a36a228938
commit
f10ae3e239
@ -382,7 +382,8 @@ void AbstractLayout::loadConfig()
|
||||
m_color = m_layoutGroup.readEntry("color", QString("blue"));
|
||||
m_backgroundStyle = static_cast<BackgroundStyle>(m_layoutGroup.readEntry("backgroundStyle", (int)ColorBackgroundStyle));
|
||||
|
||||
m_schemeFile = m_layoutGroup.readEntry("schemeFile", Data::Layout::DEFAULTSCHEMEFILE);
|
||||
m_schemeFile = m_layoutGroup.readEntry("schemeFile", QString(Data::Layout::DEFAULTSCHEMEFILE));
|
||||
m_schemeFile = m_schemeFile.isEmpty() ? Data::Layout::DEFAULTSCHEMEFILE : m_schemeFile;
|
||||
|
||||
QString deprecatedTextColor = m_layoutGroup.readEntry("textColor", QString());
|
||||
QString deprecatedBackground = m_layoutGroup.readEntry("background", QString());
|
||||
|
@ -55,6 +55,7 @@ void CentralLayout::initToCorona(Latte::Corona *corona)
|
||||
m_corona->layoutsManager()->synchronizer(), &Layouts::Synchronizer::updateKWinDisabledBorders);
|
||||
|
||||
connect(this, &Layout::AbstractLayout::schemeFileChanged, this, &CentralLayout::onSchemeFileChanged);
|
||||
connect(m_corona->wm()->schemesTracker(), &WindowSystem::Tracker::Schemes::defaultSchemeChanged, this, &CentralLayout::onSchemeFileChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,8 @@ void Schemes::updateDefaultScheme()
|
||||
if (!m_schemes.contains("kdeglobals") || m_schemes["kdeglobals"]->schemeFile() != defaultSchemePath) {
|
||||
m_schemes["kdeglobals"] = dScheme;
|
||||
}
|
||||
|
||||
emit defaultSchemeChanged();
|
||||
}
|
||||
|
||||
SchemeColors *Schemes::schemeForFile(const QString &scheme)
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
|
||||
signals:
|
||||
void colorSchemeChanged(const WindowId &wid);
|
||||
void defaultSchemeChanged();
|
||||
|
||||
private slots:
|
||||
void updateDefaultScheme();
|
||||
|
@ -96,6 +96,8 @@ Loader{
|
||||
return themeExtended.lightTheme;
|
||||
} else if (root.themeColors === LatteContainment.Types.ReverseThemeColors) {
|
||||
return themeExtended.isLightTheme ? themeExtended.darkTheme : themeExtended.lightTheme;
|
||||
} else if (root.themeColors === LatteContainment.Types.LayoutThemeColors && latteView && latteView.layout) {
|
||||
return latteView.layout.scheme;
|
||||
}
|
||||
|
||||
if (root.themeColors === LatteContainment.Types.SmartThemeColors) {
|
||||
|
Loading…
Reference in New Issue
Block a user