From 26b593455e220a905451634dbd58fa7c53539689 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 21 Mar 2021 11:59:53 +0100 Subject: [PATCH] The folder icon for the gamelistInfo field is now placed according to the selected alignment. --- es-app/src/views/gamelist/DetailedGameListView.cpp | 6 +++++- es-app/src/views/gamelist/GridGameListView.cpp | 6 +++++- es-app/src/views/gamelist/VideoGameListView.cpp | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp index fa979b29d..f89154669 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp @@ -358,8 +358,9 @@ void DetailedGameListView::updateInfoPanel() // If a filter has been applied, then the number of filtered and total games replaces // the game counter. std::string gamelistInfoString; + Alignment infoAlign = mGamelistInfo.getHorizontalAlignment(); - if (mIsFolder) + if (mIsFolder && infoAlign == ALIGN_RIGHT) gamelistInfoString = ViewController::FOLDER_CHAR + " "; if (mIsFiltered) { @@ -382,6 +383,9 @@ void DetailedGameListView::updateInfoPanel() + std::to_string(mFavoritesGameCount); } + if (mIsFolder && infoAlign != ALIGN_RIGHT) + gamelistInfoString += " " + ViewController::FOLDER_CHAR; + mGamelistInfo.setValue(gamelistInfoString); // Fade in the game image. diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index 756f2daa5..ecb1741fb 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -458,6 +458,10 @@ void GridGameListView::updateInfoPanel() // If a filter has been applied, then the number of filtered and total games replaces // the game counter. std::string gamelistInfoString; + Alignment infoAlign = mGamelistInfo.getHorizontalAlignment(); + + if (mIsFolder && infoAlign == ALIGN_RIGHT) + gamelistInfoString = ViewController::FOLDER_CHAR + " "; if (mIsFiltered) { if (mFilteredGameCountAll == mFilteredGameCount) @@ -478,7 +482,7 @@ void GridGameListView::updateInfoPanel() std::to_string(mFavoritesGameCount); } - if (mIsFolder) + if (mIsFolder && infoAlign != ALIGN_RIGHT) gamelistInfoString += " " + ViewController::FOLDER_CHAR; mGamelistInfo.setValue(gamelistInfoString); diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp index b91404f23..25db97df0 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGameListView.cpp @@ -401,8 +401,9 @@ void VideoGameListView::updateInfoPanel() // If a filter has been applied, then the number of filtered and total games replaces // the game counter. std::string gamelistInfoString; + Alignment infoAlign = mGamelistInfo.getHorizontalAlignment(); - if (mIsFolder) + if (mIsFolder && infoAlign == ALIGN_RIGHT) gamelistInfoString = ViewController::FOLDER_CHAR + " "; if (mIsFiltered) { @@ -425,6 +426,9 @@ void VideoGameListView::updateInfoPanel() + std::to_string(mFavoritesGameCount); } + if (mIsFolder && infoAlign != ALIGN_RIGHT) + gamelistInfoString += " " + ViewController::FOLDER_CHAR; + mGamelistInfo.setValue(gamelistInfoString); // Fade in the game image.