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) {