Merge branch '63-add-badges-decals-e-g-for-favorites-completed-games-non-working-games-collections-and-folders' into 575-theme-add-a-modern-clean-switch-like-theme-as-an-official-theme-in-es-de-to-choose-from

This commit is contained in:
Sophia Hadash 2021-09-26 02:45:31 +02:00
commit 67bbc09913
9 changed files with 235 additions and 1090 deletions

View file

@ -121,8 +121,6 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
mImage.applyTheme(theme, getName(), "md_image",
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
mBadges.applyTheme(theme, getName(), "md_badges",
POSITION | ThemeFlags::SIZE | Z_INDEX | DIRECTION | VISIBLE);
mName.applyTheme(theme, getName(), "md_name", ALL);
initMDLabels();

View file

@ -164,8 +164,6 @@ void VideoGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
mVideo->applyTheme(theme, getName(), "md_video",
POSITION | ThemeFlags::SIZE | ThemeFlags::DELAY | Z_INDEX | ROTATION |
VISIBLE);
mBadges.applyTheme(theme, getName(), "md_badges",
POSITION | ThemeFlags::SIZE | Z_INDEX | DIRECTION | VISIBLE);
mName.applyTheme(theme, getName(), "md_name", ALL);
initMDLabels();

View file

@ -51,13 +51,13 @@ private:
TextComponent mLblLastPlayed;
TextComponent mLblPlayCount;
BadgesComponent mBadges;
RatingComponent mRating;
DateTimeComponent mReleaseDate;
TextComponent mDeveloper;
TextComponent mPublisher;
TextComponent mGenre;
TextComponent mPlayers;
BadgesComponent mBadges;
DateTimeComponent mLastPlayed;
TextComponent mPlayCount;
TextComponent mName;

View file

@ -102,7 +102,7 @@ void FlexboxComponent::computeLayout()
float anchorYStart = anchorY;
// Compute total container size.
glm::vec2 totalSize = {mItemMargin.x, mItemMargin.y};
glm::vec2 totalSize = {-mItemMargin.x, -mItemMargin.y};
if (mDirection == "row") {
totalSize.x += (mItemMargin.x + mItemWidth) * mItemsPerLine;
totalSize.y += (mItemMargin.y + maxItemSize.y) * nLines;
@ -121,8 +121,12 @@ void FlexboxComponent::computeLayout()
float y = anchorY - anchorOriginY * size.y;
// Apply item margin.
x += mItemMargin.x * (directionLine.x >= 0.0f ? 1.0f : -1.0f);
y += mItemMargin.y * (directionLine.y >= 0.0f ? 1.0f : -1.0f);
if ((mDirection == "row" && i % std::max(1, (int) mItemsPerLine) != 0) ||
(mDirection == "column" && i >= (int) mItemsPerLine))
x += mItemMargin.x * (directionLine.x >= 0.0f ? 1.0f : -1.0f);
if ((mDirection == "column" && i % std::max(1, (int) mItemsPerLine) != 0) ||
(mDirection == "row" && i >= (int) mItemsPerLine))
y += mItemMargin.y * (directionLine.y >= 0.0f ? 1.0f : -1.0f);
// Apply alignment
if (mAlign == ITEM_ALIGN_END) {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 68 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 67 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 67 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -244,7 +244,7 @@ based on: 'recalbox-multi' by the Recalbox community
<direction>row</direction>
<align>start</align>
<itemsPerLine>2</itemsPerLine>
<itemMargin>10 5</itemMargin>
<itemMargin>5 5</itemMargin>
<itemWidth>.035</itemWidth>
<!-- badges properties -->