Fixed an issue where some theme loading warning messages for the gamelistinfo element were not formatted correctly

This commit is contained in:
Leon Styhre 2023-08-07 22:04:29 +02:00
parent 0872201652
commit 23749f16eb

View file

@ -388,7 +388,8 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"\"stationary\" for element \"" "\"stationary\" for element \""
<< element.substr(5) << "\" defined as \"" << stationary << "\""; << element.substr(elementType == "gamelistinfo" ? 13 : 5)
<< "\" defined as \"" << stationary << "\"";
} }
if (elem->has("metadataElement") && elem->get<bool>("metadataElement")) if (elem->has("metadataElement") && elem->get<bool>("metadataElement"))
@ -415,8 +416,8 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"\"horizontalAlignment\" for element \"" "\"horizontalAlignment\" for element \""
<< element.substr(5) << "\" defined as \"" << horizontalAlignment << element.substr(elementType == "gamelistinfo" ? 13 : 5)
<< "\""; << "\" defined as \"" << horizontalAlignment << "\"";
} }
if (properties & ALIGNMENT && elem->has("verticalAlignment")) { if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
@ -431,7 +432,8 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"\"verticalAlignment\" for element \"" "\"verticalAlignment\" for element \""
<< element.substr(5) << "\" defined as \"" << verticalAlignment << "\""; << element.substr(elementType == "gamelistinfo" ? 13 : 5)
<< "\" defined as \"" << verticalAlignment << "\"";
} }
if (properties & TEXT && elem->has("text")) if (properties & TEXT && elem->has("text"))