parameterize widgettext_shadow_night color

This commit is contained in:
sonora 2015-02-01 15:46:17 +01:00
parent f2f1dd6562
commit 93afffc0ff
3 changed files with 6 additions and 4 deletions

View file

@ -18,6 +18,8 @@
<color name="color_transparent">#00000000</color>
<color name="widgettext_night">#ffC8C8C8</color>
<!-- widgettext_shadow_night is the same as widget background color for non-transparent night skin (from box_night_free_simple.9.png) -->
<color name="widgettext_shadow_night">#dc262626</color>
<!-- style colors -->
<color name="group_background">#A5A5A5</color>

View file

@ -389,8 +389,8 @@ public class MapInfoLayer extends OsmandMapLayer {
themeId = calcThemeId;
boolean textBold = following;
int textColor = nightMode ? view.getResources().getColor(R.color.widgettext_night):Color.BLACK;
// Night shadowColor always use widget background color for non-transparent night skin (from box_night_free_simple.9.png, is #dc262626)
int textShadowColor = transparent && !nightMode? Color.WHITE : 0xdc262626;
// Night shadowColor always use widgettext_shadow_night, same as widget background color for non-transparent night skin (from box_night_free_simple.9.png)
int textShadowColor = transparent && !nightMode? Color.WHITE : view.getResources().getColor(R.color.widgettext_shadow_night);
int boxTop;
int boxTopStack;
int boxTopR;

View file

@ -19,7 +19,7 @@ public class RulerControl extends MapControls {
//ruler and ruler label appeareance:
// Day view: color black, shadowColor white (transpparent skin or not)
// Night view: color widgettext_night, shadowColor always use widget background color for non-transparent night skin (from box_night_free_simple.9.png, is #dc262626)
// Night view: color widgettext_night, shadowColor always use widgettext_shadow_night, same as widget background color for non-transparent night skin (from box_night_free_simple.9.png)
ShadowText cacheRulerText = null;
double cacheRulerZoom = 0;
@ -98,7 +98,7 @@ public class RulerControl extends MapControls {
}
rulerDrawable.draw(canvas);
int shadowColor = isNight == true ? 0xdc262626 : Color.WHITE;
int shadowColor = isNight == true ? mapActivity.getResources().getColor(R.color.widgettext_shadow_night) : Color.WHITE;
cacheRulerText.draw(canvas, bounds.left + (bounds.width() - cacheRulerTextLen) / 2, bounds.bottom - 8 * scaleCoefficient,
rulerTextPaint, shadowColor);
}