MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateColorsFromSettings

Method updateColorsFromSettings

kdevplatform/language/highlighting/colorcache.cpp:303–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303void ColorCache::updateColorsFromSettings()
304{
305 auto settings = ICore::self()->languageController()->completionSettings();
306
307 const auto globalColorSource = settings->globalColorSource();
308 const auto globalColorSourceChanged = globalColorSource != m_globalColorSource;
309 m_globalColorSource = globalColorSource;
310
311 const auto globalRatio = settings->globalColorizationLevel();
312 const auto globalRatioChanged = globalRatio != m_globalColorRatio;
313 m_globalColorRatio = globalRatio;
314
315 const auto localRatio = settings->localColorizationLevel();
316 const auto localRatioChanged = localRatio != m_localColorRatio;
317 m_localColorRatio = localRatio;
318
319 const auto boldDeclartions = settings->boldDeclarations();
320 const auto boldDeclarationsChanged = boldDeclartions != m_boldDeclarations;
321 m_boldDeclarations = boldDeclartions;
322
323 if (m_view && (globalRatioChanged || globalColorSourceChanged)) {
324 updateDefaultColorsFromSource();
325 }
326
327 if (globalColorSourceChanged || globalRatioChanged || localRatioChanged || boldDeclarationsChanged) {
328 update();
329 }
330}
331
332void ColorCache::updateDefaultColorsFromSource()
333{

Callers

nothing calls this directly

Calls 6

completionSettingsMethod · 0.80
languageControllerMethod · 0.80
globalColorSourceMethod · 0.80
boldDeclarationsMethod · 0.80

Tested by

no test coverage detected