diff --git a/THEMES.md b/THEMES.md index 3c2abfe93..1fac63f77 100644 --- a/THEMES.md +++ b/THEMES.md @@ -240,9 +240,9 @@ Reference #### basic * `image name="background"` - ALL - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). -* `text name="headerText"` - ALL - - A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default. -* `image name="header"` - ALL +* `text name="logoText"` - ALL + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. +* `image name="logo"` - ALL - A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place. * `textlist name="gamelist"` - ALL - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default. @@ -252,9 +252,9 @@ Reference #### detailed * `image name="background"` - ALL - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). -* `text name="headerText"` - ALL - - A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default. -* `image name="header"` - ALL +* `text name="logoText"` - ALL + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. +* `image name="logo"` - ALL - A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place. * `textlist name="gamelist"` - ALL - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default. @@ -299,16 +299,16 @@ Reference #### grid * `image name="background"` - ALL - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). -* `text name="headerText"` - ALL - - A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default. -* `image name="header"` - ALL +* `text name="logoText"` - ALL + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. +* `image name="logo"` - ALL - A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place. --- #### system -* `image name="header"` - PATH - - A header (logo) image, to be displayed in the system logo carousel. +* `image name="logo"` - PATH + - A logo image, to be displayed in the system logo carousel. * You can use extra elements (elements with `extra="true"`) to add your own backgrounds, etc. They will be displayed behind the carousel, and scroll relative to the carousel. --- diff --git a/src/views/SystemView.cpp b/src/views/SystemView.cpp index 97c66d778..8a8bd245e 100644 --- a/src/views/SystemView.cpp +++ b/src/views/SystemView.cpp @@ -32,11 +32,11 @@ void SystemView::populate() e.object = *it; // make logo - if(theme->getElement("system", "header", "image")) + if(theme->getElement("system", "logo", "image")) { ImageComponent* logo = new ImageComponent(mWindow); logo->setMaxSize(logoSize()); - logo->applyTheme((*it)->getTheme(), "system", "header", ThemeFlags::PATH); + logo->applyTheme((*it)->getTheme(), "system", "logo", ThemeFlags::PATH); logo->setPosition((logoSize().x() - logo->getSize().x()) / 2, (logoSize().y() - logo->getSize().y()) / 2); // vertically and horizontally center e.data.logo = std::shared_ptr<GuiComponent>(logo); }else{ diff --git a/src/views/gamelist/ISimpleGameListView.cpp b/src/views/gamelist/ISimpleGameListView.cpp index c0febefe6..262954b96 100644 --- a/src/views/gamelist/ISimpleGameListView.cpp +++ b/src/views/gamelist/ISimpleGameListView.cpp @@ -7,7 +7,7 @@ ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root), mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window) { - mHeaderText.setText("Header"); + mHeaderText.setText("Logo Text"); mHeaderText.setSize(mSize.x(), 0); mHeaderText.setPosition(0, 0); mHeaderText.setCentered(true); @@ -27,8 +27,8 @@ void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme { using namespace ThemeFlags; mBackground.applyTheme(theme, getName(), "background", ALL); - mHeaderImage.applyTheme(theme, getName(), "header", ALL); - mHeaderText.applyTheme(theme, getName(), "headerText", ALL); + mHeaderImage.applyTheme(theme, getName(), "logo", ALL); + mHeaderText.applyTheme(theme, getName(), "logoText", ALL); mThemeExtras.setExtras(ThemeData::makeExtras(theme, getName(), mWindow)); if(mHeaderImage.hasImage())