Removed support for all deprecated theme properties.

This commit is contained in:
Leon Styhre 2023-01-04 21:36:22 +01:00
parent b1dbd28be0
commit ad973e1ffa
2 changed files with 2 additions and 26 deletions

View file

@ -66,14 +66,8 @@ std::vector<std::string> ThemeData::sLegacyProperties {
{"logoRotation"},
{"logoRotationOrigin"},
{"logoAlignment"},
{"maxLogoCount"}};
std::vector<std::string> ThemeData::sDeprecatedProperties {
{"selectorOffsetY"},
{"staticItem"},
{"itemType"},
{"defaultItem"},
{"itemInterpolation"}};
{"maxLogoCount"},
{"selectorOffsetY"}};
std::vector<std::pair<std::string, std::string>> ThemeData::sSupportedAspectRatios {
{"automatic", "automatic"},
@ -128,9 +122,6 @@ std::map<std::string, std::map<std::string, ThemeData::ElementPropertyType>>
{"staticImage", PATH},
{"imageType", STRING},
{"defaultImage", PATH},
{"staticItem", PATH}, // TEMPORARY: For backward compatibility.
{"itemType", STRING}, // TEMPORARY: For backward compatibility.
{"defaultItem", PATH}, // TEMPORARY: For backward compatibility.
{"maxItemCount", FLOAT},
{"maxLogoCount", FLOAT}, // For backward compatibility with legacy themes.
{"itemsBeforeCenter", UNSIGNED_INTEGER},
@ -141,7 +132,6 @@ std::map<std::string, std::map<std::string, ThemeData::ElementPropertyType>>
{"itemRotation", FLOAT},
{"itemRotationOrigin", NORMALIZED_PAIR},
{"itemAxisHorizontal", BOOLEAN},
{"itemInterpolation", STRING}, // TEMPORARY: For backward compatibility.
{"imageInterpolation", STRING},
{"imageColor", COLOR},
{"imageColorEnd", COLOR},
@ -193,7 +183,6 @@ std::map<std::string, std::map<std::string, ThemeData::ElementPropertyType>>
{"itemTransitions", STRING},
{"rowTransitions", STRING},
{"unfocusedItemOpacity", FLOAT},
{"edgeScaleInwards", BOOLEAN}, // TODO
{"imageFit", STRING},
{"imageRelativeScale", FLOAT},
{"imageColor", COLOR},
@ -1615,18 +1604,6 @@ void ThemeData::parseElement(const pugi::xml_node& root,
}
}
// Print a warning if a deprecated property is used for a non-legacy theme set.
if (!mLegacyTheme) {
for (auto& deprecatedProperty : sDeprecatedProperties) {
if (nodeName == deprecatedProperty) {
LOG(LogWarning)
<< "ThemeData::parseElement(): Property \"" << deprecatedProperty
<< "\" is deprecated and support for it will be removed in a future "
"version";
}
}
}
// If an attribute exists, then replace nodeName with its name.
auto attributeEntry = sPropertyAttributeMap.find(element.type);
if (attributeEntry != sPropertyAttributeMap.end()) {

View file

@ -294,7 +294,6 @@ private:
static std::vector<std::string> sLegacySupportedViews;
static std::vector<std::string> sLegacySupportedFeatures;
static std::vector<std::string> sLegacyProperties;
static std::vector<std::string> sDeprecatedProperties;
static std::vector<std::pair<std::string, std::string>> sSupportedAspectRatios;
static std::map<std::string, float> sAspectRatioMap;