MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / parseColorReplaceList

Method parseColorReplaceList

src/theme/QtAdvancedStylesheet.cpp:696–714  ·  view source on GitHub ↗

============================================================================

Source from the content-addressed store, hash-verified

694
695//============================================================================
696tColorReplaceList QtAdvancedStylesheetPrivate::parseColorReplaceList(const QJsonObject& JsonObject) const
697{
698 // Fill the color replace list with the values read from style json file
699 tColorReplaceList ColorReplaceList;
700 for (auto it = JsonObject.constBegin(); it != JsonObject.constEnd(); ++it)
701 {
702 auto TemplateColor = it.key();
703 auto ThemeColor = it.value().toString();
704 // If the color starts with an hashtag, then we have a real color value
705 // If it does not start with # then it is a theme variable
706 if (!ThemeColor.startsWith('#'))
707 {
708 ThemeColor = _this->themeVariableValue(ThemeColor);
709 }
710 ColorReplaceList.append({TemplateColor, ThemeColor});
711 }
712
713 return ColorReplaceList;
714}
715
716
717//============================================================================

Callers

nothing calls this directly

Calls 1

themeVariableValueMethod · 0.80

Tested by

no test coverage detected