From 93afffc0ffc597030f811a74120970d1310084f2 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 1 Feb 2015 15:46:17 +0100 Subject: [PATCH] parameterize widgettext_shadow_night color --- OsmAnd/res/values/colors.xml | 2 ++ OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java | 4 ++-- OsmAnd/src/net/osmand/plus/views/controls/RulerControl.java | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 00036f3bf7..c2d6f89b3e 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -18,6 +18,8 @@ #00000000 #ffC8C8C8 + + #dc262626 #A5A5A5 diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java index a853917e62..2d0434f39c 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java @@ -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; diff --git a/OsmAnd/src/net/osmand/plus/views/controls/RulerControl.java b/OsmAnd/src/net/osmand/plus/views/controls/RulerControl.java index 8badd15064..fd83d815d6 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/RulerControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/RulerControl.java @@ -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); }