From 0f53d65f0ddc4a4cb4eebf41d3560c1ff7d6f615 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 20 Sep 2022 00:39:03 +0200 Subject: [PATCH] Increased the maximum carousel size to 2 per axis. --- es-core/src/components/primary/CarouselComponent.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 7f52cb338..0b2452d10 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -1108,16 +1108,10 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, GuiComponent::applyTheme(theme, view, element, ALL); - // Some legacy themes use an excessively large carousel and although this is clearly an - // error we need to allow it so these themes render correctly. - float maxSize {1.5f}; - if (mLegacyMode) - maxSize = 2.0f; - mSize.x = glm::clamp(mSize.x, mRenderer->getScreenWidth() * 0.05f, - mRenderer->getScreenWidth() * maxSize); + mRenderer->getScreenWidth() * 2.0f); mSize.y = glm::clamp(mSize.y, mRenderer->getScreenHeight() * 0.05f, - mRenderer->getScreenHeight() * maxSize); + mRenderer->getScreenHeight() * 2.0f); } template void CarouselComponent::onCursorChanged(const CursorState& state)