Skip to content

Commit

Permalink
zero percentage value shown as white and without arrow
Browse files Browse the repository at this point in the history
to be consistent with the format if Statement of Asset.
(0% was previously green with top arrow)
  • Loading branch information
mierin12 authored and buchen committed Oct 25, 2024
1 parent 760247a commit 53187aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public NumberColorLabelProvider(Values<N> format, Function<Object, N> label, Fun
public Color getForeground(Object element)
{
Number value = label.apply(element);
if (value == null)
if (value == null || value.doubleValue() == 0)
return null;

return value.doubleValue() >= 0 ? Colors.theme().greenForeground() : Colors.theme().redForeground();
Expand All @@ -42,7 +42,7 @@ public Color getForeground(Object element)
public Image getImage(Object element)
{
Number value = label.apply(element);
if (value == null)
if (value == null || value.doubleValue() == 0)
return null;

return value.doubleValue() >= 0 ? Images.GREEN_ARROW.image() : Images.RED_ARROW.image();
Expand Down

0 comments on commit 53187aa

Please sign in to comment.