From 716aa3df4a75e8b827d5845ba634d704895649fb Mon Sep 17 00:00:00 2001 From: Sophia Hadash Date: Tue, 12 Oct 2021 10:48:32 +0200 Subject: [PATCH] cleanup --- es-app/src/views/SystemView.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 230db28da..e42948fc4 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -68,7 +68,7 @@ void SystemView::populate() e.name = (*it)->getName(); e.object = *it; - // Component offset. + // Component offset. Used for positioning placeholders. glm::vec3 offsetLogo = {0.0f, 0.0f, 0.0f}; glm::vec3 offsetLogoPlaceholderText = {0.0f, 0.0f, 0.0f}; @@ -89,13 +89,12 @@ void SystemView::populate() } } + // No logo available? Make placeholder. if (!e.data.logo) { - // No logo in theme; use placeholder. glm::vec2 resolution = glm::vec2{static_cast(Renderer::getScreenWidth()), static_cast(Renderer::getScreenHeight())}; glm::vec3 center = {resolution.x / 2.0f, resolution.y / 2.0f, 1.0f}; - glm::vec2 scale{getParent() ? getParent()->getSize() : resolution}; // Placeholder Image. const ThemeData::ThemeElement* logoElem = @@ -190,7 +189,7 @@ void SystemView::populate() e.data.logo->setPosition(v + offsetLogo); if (e.data.logoPlaceholderText) e.data.logoPlaceholderText->setPosition( - v + offsetLogoPlaceholderText); // e.data.logo->getPosition() + + v + offsetLogoPlaceholderText); // Make background extras. e.data.backgroundExtras = ThemeData::makeExtras((*it)->getTheme(), "system", mWindow);