From 23749f16eb6f4e54cc58812674a535e18c1670e6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 7 Aug 2023 22:04:29 +0200 Subject: [PATCH] Fixed an issue where some theme loading warning messages for the gamelistinfo element were not formatted correctly --- es-core/src/components/TextComponent.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index 73b6e8c83..57d755dc1 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -388,7 +388,8 @@ void TextComponent::applyTheme(const std::shared_ptr& theme, LOG(LogWarning) << componentName << ": Invalid theme configuration, property " "\"stationary\" for element \"" - << element.substr(5) << "\" defined as \"" << stationary << "\""; + << element.substr(elementType == "gamelistinfo" ? 13 : 5) + << "\" defined as \"" << stationary << "\""; } if (elem->has("metadataElement") && elem->get("metadataElement")) @@ -415,8 +416,8 @@ void TextComponent::applyTheme(const std::shared_ptr& theme, LOG(LogWarning) << componentName << ": Invalid theme configuration, property " "\"horizontalAlignment\" for element \"" - << element.substr(5) << "\" defined as \"" << horizontalAlignment - << "\""; + << element.substr(elementType == "gamelistinfo" ? 13 : 5) + << "\" defined as \"" << horizontalAlignment << "\""; } if (properties & ALIGNMENT && elem->has("verticalAlignment")) { @@ -431,7 +432,8 @@ void TextComponent::applyTheme(const std::shared_ptr& theme, LOG(LogWarning) << componentName << ": Invalid theme configuration, property " "\"verticalAlignment\" for element \"" - << element.substr(5) << "\" defined as \"" << verticalAlignment << "\""; + << element.substr(elementType == "gamelistinfo" ? 13 : 5) + << "\" defined as \"" << verticalAlignment << "\""; } if (properties & TEXT && elem->has("text"))