Add widget colors
This commit is contained in:
parent
a18c3c8b83
commit
259c66ced9
3 changed files with 12 additions and 10 deletions
|
@ -177,8 +177,10 @@
|
|||
<color name="color_transparent">#0000</color>
|
||||
<color name="color_black_transparent">#90000000</color>
|
||||
<color name="widgettext_night">#ffC8C8C8</color>
|
||||
<color name="widgettext_day">#000</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>
|
||||
<color name="widgettext_shadow_day">#fff</color>
|
||||
|
||||
<!-- style colors -->
|
||||
<color name="group_background">#A5A5A5</color>
|
||||
|
|
|
@ -91,7 +91,6 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
private List<MapHudButton> controls = new ArrayList<>();
|
||||
private final MapActivity mapActivity;
|
||||
private int shadowColor = -1;
|
||||
// private RulerControl rulerControl;
|
||||
// private List<MapControls> allControls = new ArrayList<MapControls>();
|
||||
|
||||
|
@ -750,13 +749,12 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
private void updateControls(@NonNull RotatedTileBox tileBox, DrawSettings drawSettings) {
|
||||
boolean isNight = drawSettings != null && drawSettings.isNightMode();
|
||||
boolean portrait = isPotrait();
|
||||
int shadw = isNight ? Color.TRANSPARENT : Color.WHITE;
|
||||
int textColor = isNight ? mapActivity.getResources().getColor(R.color.widgettext_night) : Color.BLACK;
|
||||
if (shadowColor != shadw) {
|
||||
shadowColor = shadw;
|
||||
// int shadw = isNight ? mapActivity.getResources().getColor(R.color.widgettext_shadow_night) :
|
||||
// mapActivity.getResources().getColor(R.color.widgettext_shadow_day);
|
||||
int textColor = isNight ? mapActivity.getResources().getColor(R.color.widgettext_night) :
|
||||
mapActivity.getResources().getColor(R.color.widgettext_day);
|
||||
// TODOnightMode
|
||||
// updatextColor(textColor, shadw, rulerControl, zoomControls, mapMenuControls);
|
||||
}
|
||||
// default buttons
|
||||
boolean routePlanningMode = false;
|
||||
RoutingHelper rh = mapActivity.getRoutingHelper();
|
||||
|
|
|
@ -305,9 +305,11 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
TextState ts = new TextState();
|
||||
ts.textBold = following;
|
||||
ts.night = nightMode;
|
||||
ts.textColor = nightMode ? ContextCompat.getColor(view.getContext(), R.color.widgettext_night) : Color.BLACK;
|
||||
ts.textColor = nightMode ? ContextCompat.getColor(view.getContext(), R.color.widgettext_night) :
|
||||
ContextCompat.getColor(view.getContext(), R.color.widgettext_day);
|
||||
// Night shadowColor always use widgettext_shadow_night, same as widget background color for non-transparent
|
||||
ts.textShadowColor = nightMode ? ContextCompat.getColor(view.getContext(), R.color.widgettext_shadow_night) : Color.WHITE;
|
||||
ts.textShadowColor = nightMode ? ContextCompat.getColor(view.getContext(), R.color.widgettext_shadow_night) :
|
||||
ContextCompat.getColor(view.getContext(), R.color.widgettext_shadow_day);
|
||||
if (!transparent && !nightMode) {
|
||||
ts.textShadowRadius = 0;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue