From 6c8985fe3eeb8238559143dd485aa94b28a49de4 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 29 Jan 2023 23:05:28 +0100 Subject: [PATCH] Made it possible to set negative values for the selectedItemMargins carousel property. --- es-core/src/components/primary/CarouselComponent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 64d07657e..0c80d3685 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -1261,7 +1261,7 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, if (mType == CarouselType::HORIZONTAL || mType == CarouselType::VERTICAL) { if (elem->has("selectedItemMargins")) { const glm::vec2 selectedItemMargins { - glm::clamp(elem->get("selectedItemMargins"), 0.0f, 1.0f)}; + glm::clamp(elem->get("selectedItemMargins"), -1.0f, 1.0f)}; if (mType == CarouselType::HORIZONTAL) mSelectedItemMargins = selectedItemMargins * Renderer::getScreenWidth(); else