diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index a529cac68..97cbf24b5 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -140,9 +140,6 @@ void GamelistView::onThemeChanged(const std::shared_ptr& theme) mTextList = std::make_unique>(); mPrimary = mTextList.get(); } - mPrimary->setPosition(0.0f, mSize.y * 0.1f); - mPrimary->setSize(mSize.x, mSize.y * 0.8f); - mPrimary->setAlignment(TextListComponent::PrimaryAlignment::ALIGN_LEFT); mPrimary->setCursorChangedCallback( [&](const CursorState& state) { updateView(state); }); mPrimary->setDefaultZIndex(50.0f); @@ -357,9 +354,6 @@ void GamelistView::onThemeChanged(const std::shared_ptr& theme) if (mPrimary == nullptr) { mTextList = std::make_unique>(); mPrimary = mTextList.get(); - mPrimary->setPosition(0.0f, mSize.y * 0.1f); - mPrimary->setSize(mSize.x, mSize.y * 0.8f); - mPrimary->setAlignment(TextListComponent::PrimaryAlignment::ALIGN_LEFT); mPrimary->setCursorChangedCallback([&](const CursorState& state) { updateView(state); }); mPrimary->setDefaultZIndex(50.0f); mPrimary->setZIndex(50.0f); diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 373649929..128f1cfb4 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -914,9 +914,6 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, const std::string& element, unsigned int properties) { - using namespace ThemeFlags; - const ThemeData::ThemeElement* elem {theme->getElement(view, element, "carousel")}; - mSize.x = Renderer::getScreenWidth(); mSize.y = Renderer::getScreenHeight() * 0.23240f; GuiComponent::mPosition.x = 0.0f; @@ -925,6 +922,9 @@ void CarouselComponent::applyTheme(const std::shared_ptr& theme, mCarouselColorEnd = 0xFFFFFFD8; mZIndex = mDefaultZIndex; + using namespace ThemeFlags; + const ThemeData::ThemeElement* elem {theme->getElement(view, element, "carousel")}; + if (!elem) return; diff --git a/es-core/src/components/primary/TextListComponent.h b/es-core/src/components/primary/TextListComponent.h index cadfc08e7..34b25f1ca 100644 --- a/es-core/src/components/primary/TextListComponent.h +++ b/es-core/src/components/primary/TextListComponent.h @@ -482,7 +482,14 @@ void TextListComponent::applyTheme(const std::shared_ptr& theme, const std::string& element, unsigned int properties) { + mSize.x = Renderer::getScreenWidth(); + mSize.y = Renderer::getScreenHeight() * 0.8f; + GuiComponent::mPosition.x = 0.0f; + GuiComponent::mPosition.y = Renderer::getScreenHeight() * 0.1; + setAlignment(PrimaryAlignment::ALIGN_LEFT); + GuiComponent::applyTheme(theme, view, element, properties); + using namespace ThemeFlags; const ThemeData::ThemeElement* elem {theme->getElement(view, element, "textlist")};