mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Adjusted some theme log warnings in BadgeComponent.
This commit is contained in:
parent
8ef07ea0d4
commit
01c2d7ff17
|
@ -209,7 +209,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
const std::string horizontalAlignment {elem->get<std::string>("horizontalAlignment")};
|
const std::string horizontalAlignment {elem->get<std::string>("horizontalAlignment")};
|
||||||
if (horizontalAlignment != "left" && horizontalAlignment != "right") {
|
if (horizontalAlignment != "left" && horizontalAlignment != "right") {
|
||||||
LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, <horizontalAlignment> "
|
LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, <horizontalAlignment> "
|
||||||
"defined as \""
|
"property defined as \""
|
||||||
<< horizontalAlignment << "\"";
|
<< horizontalAlignment << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -221,7 +221,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
const std::string alignment {elem->get<std::string>("alignment")};
|
const std::string alignment {elem->get<std::string>("alignment")};
|
||||||
if (alignment != "left" && alignment != "right") {
|
if (alignment != "left" && alignment != "right") {
|
||||||
LOG(LogWarning)
|
LOG(LogWarning)
|
||||||
<< "BadgeComponent: Invalid theme configuration, <alignment> defined as \""
|
<< "BadgeComponent: Invalid theme configuration, <alignment> property defined as \""
|
||||||
<< alignment << "\"";
|
<< alignment << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -233,7 +233,7 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
const std::string direction {elem->get<std::string>("direction")};
|
const std::string direction {elem->get<std::string>("direction")};
|
||||||
if (direction != "row" && direction != "column") {
|
if (direction != "row" && direction != "column") {
|
||||||
LOG(LogWarning)
|
LOG(LogWarning)
|
||||||
<< "BadgeComponent: Invalid theme configuration, <direction> defined as \""
|
<< "BadgeComponent: Invalid theme configuration, <direction> property defined as \""
|
||||||
<< direction << "\"";
|
<< direction << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -245,7 +245,8 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
if (elem->has("lines")) {
|
if (elem->has("lines")) {
|
||||||
const unsigned int lines {elem->get<unsigned int>("lines")};
|
const unsigned int lines {elem->get<unsigned int>("lines")};
|
||||||
if (lines < 1 || lines > 10) {
|
if (lines < 1 || lines > 10) {
|
||||||
LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, <lines> defined as \""
|
LOG(LogWarning)
|
||||||
|
<< "BadgeComponent: Invalid theme configuration, <lines> property defined as \""
|
||||||
<< lines << "\"";
|
<< lines << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -257,8 +258,8 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
if (elem->has("itemsPerLine")) {
|
if (elem->has("itemsPerLine")) {
|
||||||
const unsigned int itemsPerLine {elem->get<unsigned int>("itemsPerLine")};
|
const unsigned int itemsPerLine {elem->get<unsigned int>("itemsPerLine")};
|
||||||
if (itemsPerLine < 1 || itemsPerLine > 10) {
|
if (itemsPerLine < 1 || itemsPerLine > 10) {
|
||||||
LOG(LogWarning)
|
LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, <itemsPerLine> "
|
||||||
<< "BadgeComponent: Invalid theme configuration, <itemsPerLine> defined as \""
|
"property defined as \""
|
||||||
<< itemsPerLine << "\"";
|
<< itemsPerLine << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -271,8 +272,8 @@ void BadgeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
if ((itemMargin.x != -1.0 && itemMargin.y != -1.0) &&
|
if ((itemMargin.x != -1.0 && itemMargin.y != -1.0) &&
|
||||||
(itemMargin.x < 0.0f || itemMargin.x > 0.2f || itemMargin.y < 0.0f ||
|
(itemMargin.x < 0.0f || itemMargin.x > 0.2f || itemMargin.y < 0.0f ||
|
||||||
itemMargin.y > 0.2f)) {
|
itemMargin.y > 0.2f)) {
|
||||||
LOG(LogWarning)
|
LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, <itemMargin> property "
|
||||||
<< "BadgeComponent: Invalid theme configuration, <itemMargin> defined as \""
|
"defined as \""
|
||||||
<< itemMargin.x << " " << itemMargin.y << "\"";
|
<< itemMargin.x << " " << itemMargin.y << "\"";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue