From be903c0a86a68d3da9af39ab9547ccb5ac08be0d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 13 Nov 2022 23:04:48 +0100 Subject: [PATCH] Changed a value for the itemTransitions property for the carousel and grid components. Also changed the position of a grid property and set the minimum columns value to 1. --- es-core/src/ThemeData.cpp | 2 +- es-core/src/components/primary/CarouselComponent.h | 2 +- es-core/src/components/primary/GridComponent.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 7ca30ca14..80ba09d34 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -160,8 +160,8 @@ std::map> {"defaultItem", PATH}, {"itemSize", NORMALIZED_PAIR}, {"itemScale", FLOAT}, - {"itemSpacing", NORMALIZED_PAIR}, {"itemTransitions", STRING}, + {"itemSpacing", NORMALIZED_PAIR}, {"itemHorizontalAlignment", STRING}, {"itemVerticalAlignment", STRING}, {"horizontalOffset", FLOAT}, diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 128f1cfb4..3515a99d5 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -1010,7 +1010,7 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("itemTransitions")) { const std::string& itemTransitions {elem->get("itemTransitions")}; - if (itemTransitions == "slide") { + if (itemTransitions == "animate") { mInstantItemTransitions = false; } else if (itemTransitions == "instant") { diff --git a/es-core/src/components/primary/GridComponent.h b/es-core/src/components/primary/GridComponent.h index 779b9f3df..254c1eff8 100644 --- a/es-core/src/components/primary/GridComponent.h +++ b/es-core/src/components/primary/GridComponent.h @@ -434,7 +434,7 @@ void GridComponent::applyTheme(const std::shared_ptr& theme, return; if (elem->has("columns")) - mColumns = glm::clamp(elem->get("columns"), 0u, 100u); + mColumns = glm::clamp(elem->get("columns"), 1u, 100u); if (elem->has("itemSize")) { const glm::vec2& itemSize {glm::clamp(elem->get("itemSize"), 0.05f, 1.0f)}; @@ -446,7 +446,7 @@ void GridComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("itemTransitions")) { const std::string& itemTransitions {elem->get("itemTransitions")}; - if (itemTransitions == "scale") { + if (itemTransitions == "animate") { mInstantItemTransitions = false; } else if (itemTransitions == "instant") {