diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 0852010f9..1983ea384 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -178,6 +178,10 @@ template void CarouselComponent::addEntry(Entry& entry, const std::shared_ptr& theme) { bool legacyMode {theme->isLegacyTheme()}; + bool dynamic {true}; + + if constexpr (std::is_same_v) + dynamic = false; if (legacyMode) { const ThemeData::ThemeElement* itemElem { @@ -191,7 +195,7 @@ void CarouselComponent::addEntry(Entry& entry, const std::shared_ptrhas("default") ? itemElem->get("default") : ""}; if ((!path.empty() && ResourceManager::getInstance().fileExists(path)) || (!defaultPath.empty() && ResourceManager::getInstance().fileExists(defaultPath))) { - auto item = std::make_shared(false, false); + auto item = std::make_shared(false, dynamic); item->setLinearInterpolation(true); item->setMaxSize(mItemSize * mItemScale); item->applyTheme(theme, "system", "image_logo", @@ -204,7 +208,7 @@ void CarouselComponent::addEntry(Entry& entry, const std::shared_ptr(false, false); + auto item = std::make_shared(false, dynamic); item->setLinearInterpolation(true); item->setImage(entry.data.itemPath); item->setMaxSize(mItemSize * mItemScale); @@ -214,7 +218,7 @@ void CarouselComponent::addEntry(Entry& entry, const std::shared_ptr(false, false); + auto defaultItem = std::make_shared(false, dynamic); defaultItem->setLinearInterpolation(true); defaultItem->setImage(entry.data.defaultItemPath); defaultItem->setMaxSize(mItemSize * mItemScale);