From 4b0d3a4ecb20399ba0346c03b7560e303f44a27e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 19 Feb 2022 20:24:25 +0100 Subject: [PATCH] Clamped the themeable origin values to 0.0 to 1.0 --- es-core/src/GuiComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/GuiComponent.cpp b/es-core/src/GuiComponent.cpp index 21e6dda22..e0eff08cc 100644 --- a/es-core/src/GuiComponent.cpp +++ b/es-core/src/GuiComponent.cpp @@ -342,7 +342,7 @@ void GuiComponent::applyTheme(const std::shared_ptr& theme, // Position + size also implies origin. if ((properties & ORIGIN || (properties & POSITION && properties & ThemeFlags::SIZE)) && elem->has("origin")) { - setOrigin(elem->get("origin")); + setOrigin(glm::clamp(elem->get("origin"), 0.0f, 1.0f)); } if (properties & ThemeFlags::ROTATION) {