Update colors

This commit is contained in:
Victor Shcherb 2014-06-11 01:09:44 +02:00
parent 91b7739581
commit 40d44fcc6d
3 changed files with 8 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Paint.Style;
@ -37,7 +38,7 @@ public class FavoriteImageDrawable extends Drawable {
mgr.getDefaultDisplay().getMetrics(dm);
density = dm.density;
drawable = getResources().getDrawable(R.drawable.ic_action_fav_dark);
bmp = BitmapFactory.decodeResource(getResources(), R.drawable.ic_action_fav_dark);
bmp = BitmapFactory.decodeResource(getResources(), R.drawable.ic_action_fav_light);
bmpSize = bmp.getWidth();
paintOuter = new Paint();
paintOuter.setColor(0x88555555);
@ -49,7 +50,7 @@ public class FavoriteImageDrawable extends Drawable {
paintBmp.setDither(true);
paintInnerCircle = new Paint();
paintInnerCircle.setStyle(Style.FILL_AND_STROKE);
paintInnerCircle.setColor(color == 0 ? getResources().getColor(R.color.color_distance) : color);
paintInnerCircle.setColor(color == 0 || color == Color.BLACK ? getResources().getColor(R.color.color_distance) : color);
paintInnerCircle.setAntiAlias(true);
}

View file

@ -51,7 +51,9 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.I
}
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
return (Math.abs(objx - ex) <= radius * 2 && Math.abs(objy - ey) <= radius * 2) ;
// return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
//return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
}
@Override

View file

@ -165,7 +165,8 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
return (Math.abs(objx - ex) <= radius * 2 && Math.abs(objy - ey) <= radius * 2) ;
// return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
}
public void getWptFromPoint(RotatedTileBox tb, PointF point, List<? super WptPt> res) {