============================================================================
| 694 | |
| 695 | //============================================================================ |
| 696 | tColorReplaceList 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 | //============================================================================ |
nothing calls this directly
no test coverage detected