X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Futils%2FColors.java;h=80ec58ab82db1f642d10b1a76716a9362e1dc2e0;hp=1316a8e584ecc06e1c7b69b8c73cb02a0e68464b;hb=898bf5932a1bdb2a7b197d9e0981f722111295b6;hpb=b2df030207be4d228b20e697b42a7dccda8d1526 diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java index 1316a8e5..80ec58ab 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java @@ -202,7 +202,7 @@ public class Colors { int themeId = -1; if (themeHue == 360) themeHue = 0; - if ((themeHue >= 0) && (themeHue < 360)) { + if ((themeHue >= 0) && (themeHue < 360) && (themeHue != DEFAULT_HUE_DEG)) { int index; if ((themeHue % HueRing.hueStepDegrees) != 0) { Logger.warn("profiles", @@ -237,12 +237,12 @@ public class Colors { } public static @NonNull ColorStateList getColorStateList(int hue) { - return new ColorStateList(EMPTY_STATES, getColors(hue)); + return new ColorStateList(EMPTY_STATES, getSwipeCircleColors(hue)); } - public static int[] getColors() { - return getColors(profileThemeId); + public static int[] getSwipeCircleColors() { + return getSwipeCircleColors(profileThemeId); } - public static int[] getColors(int hue) { + public static int[] getSwipeCircleColors(int hue) { int[] colors = new int[]{0, 0, 0, 0, 0, 0}; for (int i = 0; i < 6; i++, hue = (hue + 60) % 360) { colors[i] = getPrimaryColorForHue(hue);