From f9779ded9a533ba274d35e05e31df05e113e28fe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 11 Jan 2023 23:03:50 +0100 Subject: [PATCH] Removed some deprecated code from CarouselComponent. --- .../components/primary/CarouselComponent.h | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 7fa41684f..61238d317 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -1132,17 +1132,11 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, } } - // TEMPORARY: Support for itemType is for backward compatiblity due to property name changes. - if (mGamelistView && properties && (elem->has("imageType") || elem->has("itemType"))) { + if (mGamelistView && properties && elem->has("imageType")) { const std::vector supportedImageTypes { "marquee", "cover", "backcover", "3dbox", "physicalmedia", "screenshot", "titlescreen", "miximage", "fanart", "none"}; - std::string imageTypesString; - - if (elem->has("imageType")) - imageTypesString = elem->get("imageType"); - else - imageTypesString = elem->get("itemType"); + std::string imageTypesString {elem->get("imageType")}; for (auto& character : imageTypesString) { if (std::isspace(character)) @@ -1275,24 +1269,6 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("itemScale")) mItemScale = glm::clamp(elem->get("itemScale"), 0.2f, 3.0f); - if (elem->has("itemInterpolation")) { - // TEMPORARY: Backward compatiblity due to property name changes. - const std::string& itemInterpolation {elem->get("itemInterpolation")}; - if (itemInterpolation == "linear") { - mLinearInterpolation = true; - } - else if (itemInterpolation == "nearest") { - mLinearInterpolation = false; - } - else { - mLinearInterpolation = true; - LOG(LogWarning) << "CarouselComponent: Invalid theme configuration, property " - "\"itemInterpolation\" for element \"" - << element.substr(9) << "\" defined as \"" << itemInterpolation - << "\""; - } - } - if (elem->has("imageBrightness")) mImageBrightness = glm::clamp(elem->get("imageBrightness"), -2.0f, 2.0f);