TripsGallery: Make current time label darker and use inverse text even in light mode.

This commit is contained in:
Andreas Schildbach 2021-02-05 15:40:18 +01:00
parent a3fcc83323
commit dceab2c2e8
3 changed files with 5 additions and 2 deletions

View file

@ -3,6 +3,7 @@
<!-- foreground -->
<color name="fg_significant">#ffffff</color>
<color name="fg_significant_inverse">#000000</color>
<color name="fg_less_significant">#aaaaaa</color>
<color name="fg_insignificant">#888888</color>
<color name="fg_highlighted">#ff9966</color>

View file

@ -3,6 +3,7 @@
<!-- foreground -->
<color name="fg_significant">#000000</color>
<color name="fg_significant_inverse">#ffffff</color>
<color name="fg_significant_darkdefault">#ffffff</color>
<color name="fg_less_significant">#999999</color>
<color name="fg_less_significant_darkdefault">#aaaaaa</color>
@ -26,7 +27,7 @@
<color name="bg_selected_entry">#ffcfffaf</color>
<color name="bg_individual">#cccccc</color>
<color name="bg_delayed">#cccccc</color>
<color name="bg_current_time">#eebb00</color>
<color name="bg_current_time">#cc9900</color>
<color name="bg_position">#757575</color>
<color name="bg_position_darkdefault">#bbbbbb</color>
<color name="bg_highlighted_darkdefault">#ff4444</color>

View file

@ -84,6 +84,7 @@ public class TripsGallery extends Gallery {
density = res.getDisplayMetrics().density;
final float strokeWidth = res.getDimension(R.dimen.trips_overview_stroke_width);
final int colorSignificant = res.getColor(R.color.fg_significant);
final int colorSignificantInverse = res.getColor(R.color.fg_significant_inverse);
final int colorCurrentTime = res.getColor(R.color.bg_current_time);
gridPaint.setColor(Color.GRAY);
@ -107,7 +108,7 @@ public class TripsGallery extends Gallery {
currenttimeLabelBackgroundPaint.setStrokeWidth(strokeWidth);
currenttimeLabelBackgroundPaint.setAntiAlias(true);
currenttimeLabelTextPaint.setColor(Color.BLACK);
currenttimeLabelTextPaint.setColor(colorSignificantInverse);
currenttimeLabelTextPaint.setAntiAlias(true);
currenttimeLabelTextPaint.setTextSize(res.getDimension(R.dimen.font_size_normal));
currenttimeLabelTextPaint.setTypeface(Typeface.DEFAULT_BOLD);