mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
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.
This commit is contained in:
parent
9013faf445
commit
be903c0a86
|
@ -160,8 +160,8 @@ std::map<std::string, std::map<std::string, ThemeData::ElementPropertyType>>
|
||||||
{"defaultItem", PATH},
|
{"defaultItem", PATH},
|
||||||
{"itemSize", NORMALIZED_PAIR},
|
{"itemSize", NORMALIZED_PAIR},
|
||||||
{"itemScale", FLOAT},
|
{"itemScale", FLOAT},
|
||||||
{"itemSpacing", NORMALIZED_PAIR},
|
|
||||||
{"itemTransitions", STRING},
|
{"itemTransitions", STRING},
|
||||||
|
{"itemSpacing", NORMALIZED_PAIR},
|
||||||
{"itemHorizontalAlignment", STRING},
|
{"itemHorizontalAlignment", STRING},
|
||||||
{"itemVerticalAlignment", STRING},
|
{"itemVerticalAlignment", STRING},
|
||||||
{"horizontalOffset", FLOAT},
|
{"horizontalOffset", FLOAT},
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
if (elem->has("itemTransitions")) {
|
if (elem->has("itemTransitions")) {
|
||||||
const std::string& itemTransitions {elem->get<std::string>("itemTransitions")};
|
const std::string& itemTransitions {elem->get<std::string>("itemTransitions")};
|
||||||
if (itemTransitions == "slide") {
|
if (itemTransitions == "animate") {
|
||||||
mInstantItemTransitions = false;
|
mInstantItemTransitions = false;
|
||||||
}
|
}
|
||||||
else if (itemTransitions == "instant") {
|
else if (itemTransitions == "instant") {
|
||||||
|
|
|
@ -434,7 +434,7 @@ void GridComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (elem->has("columns"))
|
if (elem->has("columns"))
|
||||||
mColumns = glm::clamp(elem->get<unsigned int>("columns"), 0u, 100u);
|
mColumns = glm::clamp(elem->get<unsigned int>("columns"), 1u, 100u);
|
||||||
|
|
||||||
if (elem->has("itemSize")) {
|
if (elem->has("itemSize")) {
|
||||||
const glm::vec2& itemSize {glm::clamp(elem->get<glm::vec2>("itemSize"), 0.05f, 1.0f)};
|
const glm::vec2& itemSize {glm::clamp(elem->get<glm::vec2>("itemSize"), 0.05f, 1.0f)};
|
||||||
|
@ -446,7 +446,7 @@ void GridComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
|
|
||||||
if (elem->has("itemTransitions")) {
|
if (elem->has("itemTransitions")) {
|
||||||
const std::string& itemTransitions {elem->get<std::string>("itemTransitions")};
|
const std::string& itemTransitions {elem->get<std::string>("itemTransitions")};
|
||||||
if (itemTransitions == "scale") {
|
if (itemTransitions == "animate") {
|
||||||
mInstantItemTransitions = false;
|
mInstantItemTransitions = false;
|
||||||
}
|
}
|
||||||
else if (itemTransitions == "instant") {
|
else if (itemTransitions == "instant") {
|
||||||
|
|
Loading…
Reference in a new issue