diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index fcd0c2695..507f747dc 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -56,17 +56,16 @@ void SystemView::populate() { mEntries.clear(); - for (auto it = SystemData::sSystemVector.cbegin(); // Line break. - it != SystemData::sSystemVector.cend(); it++) { - const std::shared_ptr& theme = (*it)->getTheme(); + for (auto it : SystemData::sSystemVector) { + const std::shared_ptr& theme = it->getTheme(); if (mViewNeedsReload) getViewElements(theme); - if ((*it)->isVisible()) { + if (it->isVisible()) { Entry e; - e.name = (*it)->getName(); - e.object = *it; + e.name = it->getName(); + e.object = it; // Component offset. Used for positioning placeholders. glm::vec3 offsetLogo = {0.0f, 0.0f, 0.0f}; @@ -75,13 +74,13 @@ void SystemView::populate() // Make logo. const ThemeData::ThemeElement* logoElem = theme->getElement("system", "logo", "image"); if (logoElem) { - std::string path = logoElem->get("path"); + auto path = logoElem->get("path"); std::string defaultPath = logoElem->has("default") ? logoElem->get("default") : ""; if ((!path.empty() && ResourceManager::getInstance()->fileExists(path)) || (!defaultPath.empty() && ResourceManager::getInstance()->fileExists(defaultPath))) { - ImageComponent* logo = new ImageComponent(mWindow, false, false); + auto* logo = new ImageComponent(mWindow, false, false); logo->setMaxSize(mCarousel.logoSize * mCarousel.logoScale); logo->applyTheme(theme, "system", "logo", ThemeFlags::PATH | ThemeFlags::COLOR); logo->setRotateByTargetSize(true); @@ -97,8 +96,7 @@ void SystemView::populate() glm::vec3 center = {resolution.x / 2.0f, resolution.y / 2.0f, 1.0f}; // Placeholder Image. - const ThemeData::ThemeElement* logoElem = - theme->getElement("system", "logoPlaceholderImage", "image"); + logoElem = theme->getElement("system", "logoPlaceholderImage", "image"); if (logoElem) { auto path = logoElem->get("path"); std::string defaultPath = @@ -106,7 +104,7 @@ void SystemView::populate() if ((!path.empty() && ResourceManager::getInstance()->fileExists(path)) || (!defaultPath.empty() && ResourceManager::getInstance()->fileExists(defaultPath))) { - ImageComponent* logo = new ImageComponent(mWindow, false, false); + auto* logo = new ImageComponent(mWindow, false, false); logo->applyTheme(theme, "system", "logoPlaceholderImage", ThemeFlags::ALL); if (!logoElem->has("size")) logo->setMaxSize(mCarousel.logoSize * mCarousel.logoScale); @@ -122,7 +120,7 @@ void SystemView::populate() if (logoPlaceholderText) { // Element 'logoPlaceholderText' found in theme: place text auto* text = - new TextComponent(mWindow, (*it)->getName(), Font::get(FONT_SIZE_LARGE), + new TextComponent(mWindow, it->getName(), Font::get(FONT_SIZE_LARGE), 0x000000FF, ALIGN_CENTER); text->setSize(mCarousel.logoSize * mCarousel.logoScale); if (mCarousel.type == VERTICAL || mCarousel.type == VERTICAL_WHEEL) { @@ -133,7 +131,7 @@ void SystemView::populate() text->setHorizontalAlignment(ALIGN_CENTER); text->setVerticalAlignment(mCarousel.logoAlignment); } - text->applyTheme((*it)->getTheme(), "system", "logoPlaceholderText", + text->applyTheme(it->getTheme(), "system", "logoPlaceholderText", ThemeFlags::ALL); if (!e.data.logo) { e.data.logo = std::shared_ptr(text); @@ -146,11 +144,11 @@ void SystemView::populate() } else { // Fallback to legacy centered placeholder text. - TextComponent* text = - new TextComponent(mWindow, (*it)->getName(), Font::get(FONT_SIZE_LARGE), + auto* text = + new TextComponent(mWindow, it->getName(), Font::get(FONT_SIZE_LARGE), 0x000000FF, ALIGN_CENTER); text->setSize(mCarousel.logoSize * mCarousel.logoScale); - text->applyTheme((*it)->getTheme(), "system", "logoText", + text->applyTheme(it->getTheme(), "system", "logoText", ThemeFlags::FONT_PATH | ThemeFlags::FONT_SIZE | ThemeFlags::COLOR | ThemeFlags::FORCE_UPPERCASE | ThemeFlags::LINE_SPACING | ThemeFlags::TEXT); @@ -192,7 +190,7 @@ void SystemView::populate() v + offsetLogoPlaceholderText); // Make background extras. - e.data.backgroundExtras = ThemeData::makeExtras((*it)->getTheme(), "system", mWindow); + e.data.backgroundExtras = ThemeData::makeExtras(it->getTheme(), "system", mWindow); // Sort the extras by z-index. std::stable_sort( @@ -202,7 +200,7 @@ void SystemView::populate() this->add(e); } } - if (mEntries.size() == 0) { + if (mEntries.empty()) { // Something is wrong, there is not a single system to show, check if UI mode is not full. if (!UIModeController::getInstance()->isUIModeFull()) { Settings::getInstance()->setString("UIMode", "full"); diff --git a/themes/rbsimple-DE/theme.xml b/themes/rbsimple-DE/theme.xml index 4d59d93e2..5b35e863f 100644 --- a/themes/rbsimple-DE/theme.xml +++ b/themes/rbsimple-DE/theme.xml @@ -21,6 +21,13 @@ based on: 'recalbox-multi' by the Recalbox community ./core/fonts/Exo2-RegularCondensed.otf 0.035 + + ./core/fonts/Exo2-RegularCondensed.otf + 0.035 + 000000FF + 0 0 + .2 .2 +