mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-09 20:31:38 +01:00
Fix for font colors not working with image backgrounds
This commit is contained in:
parent
f27313dad3
commit
982089013f
@ -61,7 +61,14 @@ public enum Theme {
|
||||
public static String replaceColors(String resourceString) {
|
||||
String replaced = resourceString;
|
||||
for (Colors c : Colors.values()) {
|
||||
replaced = replaced.replace("#" + Theme.DEFAULT.getColor(c.getId()), c.getColor());
|
||||
String color = c.getColor();
|
||||
if (!color.contains("url")) {
|
||||
replaced = replaced.replace("#" + Theme.DEFAULT.getColor(c.getId()), color);
|
||||
} else {
|
||||
String[] colorAndUrl = color.split(" ");
|
||||
replaced = replaced.replace("color: #" + Theme.DEFAULT.getColor(c.getId()), "color: " + colorAndUrl[0]);
|
||||
replaced = replaced.replace("background: #" + Theme.DEFAULT.getColor(c.getId()), "background: " + colorAndUrl[1]);
|
||||
}
|
||||
}
|
||||
return replaced;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user