mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 19:48:49 +00:00
AbstractHafasClientInterfaceProvider: Derive missing foreground colors in 'icoL'.
This commit is contained in:
parent
eb026a965f
commit
d92989cbe7
1 changed files with 2 additions and 1 deletions
|
@ -907,7 +907,8 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
||||||
final JSONObject ico = icoList.getJSONObject(i);
|
final JSONObject ico = icoList.getJSONObject(i);
|
||||||
if (ico.has("bg")) {
|
if (ico.has("bg")) {
|
||||||
final int background = parseIcoColor(ico.getJSONObject("bg"));
|
final int background = parseIcoColor(ico.getJSONObject("bg"));
|
||||||
final int foreground = parseIcoColor(ico.getJSONObject("fg"));
|
final JSONObject fg = ico.optJSONObject("fg");
|
||||||
|
final int foreground = fg != null ? parseIcoColor(fg) : Style.deriveForegroundColor(background);
|
||||||
final String shp = ico.optString("shp", null);
|
final String shp = ico.optString("shp", null);
|
||||||
if (shp == null) {
|
if (shp == null) {
|
||||||
styles.add(new Style(background, foreground));
|
styles.add(new Style(background, foreground));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue