From 53ba3fe02cb49ccba2c9ba4408d7432bf996dcd0 Mon Sep 17 00:00:00 2001 From: lantzelot-swe <75668734+lantzelot-swe@users.noreply.github.com> Date: Tue, 15 Aug 2023 08:30:50 +0200 Subject: [PATCH] fix: color for game count and file count is always black for <= 255 --- src/main/java/se/lantz/model/data/GameView.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/se/lantz/model/data/GameView.java b/src/main/java/se/lantz/model/data/GameView.java index ca25e39..9fdd877 100644 --- a/src/main/java/se/lantz/model/data/GameView.java +++ b/src/main/java/se/lantz/model/data/GameView.java @@ -11,7 +11,8 @@ import se.lantz.util.DbConstants; public class GameView implements Comparable { private static final String fontRedStart = ""; - private static final String fontRedEnd = ""; + private static final String fontEnd = ""; + private static final String fontBlackStart = ""; public static final String FAV_GAMEVIEW_NAME_PREF_KEY = "GameViewFavoritesName_"; public static final int ALL_GAMES_ID = -1; @@ -70,8 +71,10 @@ public class GameView implements Comparable { if (gameViewId != -1) { - String gameCountString = gameCount > 255 ? fontRedStart + gameCount + fontRedEnd : gameCount + ""; - String fileCountString = fileCount > 255 ? fontRedStart + fileCount + fontRedEnd : fileCount + ""; + String gameCountString = + gameCount > 255 ? fontRedStart + gameCount + fontEnd : fontBlackStart + gameCount + fontEnd; + String fileCountString = + fileCount > 255 ? fontRedStart + fileCount + fontEnd : fontBlackStart + fileCount + fontEnd; if (gameCount < fileCount) { text = name + " (" + gameCountString + "/" + fileCountString + ")";