mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Clamped the themeable origin values to 0.0 to 1.0
This commit is contained in:
parent
374a66dd76
commit
4b0d3a4ecb
|
@ -342,7 +342,7 @@ void GuiComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
// Position + size also implies origin.
|
||||
if ((properties & ORIGIN || (properties & POSITION && properties & ThemeFlags::SIZE)) &&
|
||||
elem->has("origin")) {
|
||||
setOrigin(elem->get<glm::vec2>("origin"));
|
||||
setOrigin(glm::clamp(elem->get<glm::vec2>("origin"), 0.0f, 1.0f));
|
||||
}
|
||||
|
||||
if (properties & ThemeFlags::ROTATION) {
|
||||
|
|
Loading…
Reference in a new issue