Renamed all theme "header" elements to "logo" (and "headerText" to

"logoText"). Documentation updated to reflect the change.
This commit is contained in:
Aloshi 2014-03-08 13:07:16 -06:00
parent 6db26742ff
commit 70b3408823
3 changed files with 16 additions and 16 deletions

View file

@ -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.
---

View file

@ -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{

View file

@ -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())