Fixed two small logical errors.

This commit is contained in:
Leon Styhre 2022-10-10 20:52:55 +02:00
parent 39c9bd2cbc
commit 1c82228a9c
2 changed files with 2 additions and 2 deletions

View file

@ -211,7 +211,7 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
float maxHeight {0.0f}; float maxHeight {0.0f};
if (!theme->isLegacyTheme() && properties & elem->has("size")) { if (!theme->isLegacyTheme() && elem->has("size")) {
const glm::vec2 size {elem->get<glm::vec2>("size")}; const glm::vec2 size {elem->get<glm::vec2>("size")};
if (size.x != 0.0f && size.y != 0.0f) if (size.x != 0.0f && size.y != 0.0f)
maxHeight = mSize.y * 2.0f; maxHeight = mSize.y * 2.0f;

View file

@ -459,7 +459,7 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
float maxHeight {0.0f}; float maxHeight {0.0f};
if (!theme->isLegacyTheme() && properties & elem->has("size")) { if (!theme->isLegacyTheme() && elem->has("size")) {
const glm::vec2 size {elem->get<glm::vec2>("size")}; const glm::vec2 size {elem->get<glm::vec2>("size")};
if (size.x != 0.0f && size.y != 0.0f) if (size.x != 0.0f && size.y != 0.0f)
maxHeight = mSize.y * 2.0f; maxHeight = mSize.y * 2.0f;