Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-11-12 18:47:46 +01:00
commit fca1a2db92
2 changed files with 4 additions and 15 deletions

View file

@ -55,8 +55,8 @@ public class WptPtMenuController extends MenuController {
@Override @Override
public Drawable getLeftIcon() { public Drawable getLeftIcon() {
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), return getPaintedIcon(R.drawable.ic_action_fav_dark,
wpt.getColor(getMapActivity().getResources().getColor(R.color.gpx_color_point)), false); wpt.getColor(getMapActivity().getResources().getColor(R.color.gpx_color_point)));
} }
@Override @Override

View file

@ -3,17 +3,14 @@ package net.osmand.plus.mapcontextmenu.editors;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.plus.GPXUtilities.WptPt; import net.osmand.plus.GPXUtilities.WptPt;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper; import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.util.Algorithms; import net.osmand.util.Algorithms;
@ -144,20 +141,12 @@ public class WprPtEditorFragment extends PointEditorFragment {
@Override @Override
public Drawable getNameIcon() { public Drawable getNameIcon() {
int color = wpt.getColor(defaultColor); int color = wpt.getColor(defaultColor);
return FavoriteImageDrawable.getOrCreate(getMapActivity(), color, false); return getPaintedIcon(R.drawable.ic_action_fav_dark, color);
} }
@Override @Override
public Drawable getCategoryIcon() { public Drawable getCategoryIcon() {
int color = wpt.getColor(defaultColor); int color = wpt.getColor(defaultColor);
return getIcon(R.drawable.ic_action_folder_stroke, color); return getPaintedIcon(R.drawable.ic_action_folder_stroke, color);
}
public Drawable getIcon(int resId, int color) {
OsmandApplication app = getMyApplication();
Drawable d = app.getResources().getDrawable(resId).mutate();
d.clearColorFilter();
d.setColorFilter(color, PorterDuff.Mode.SRC_IN);
return d;
} }
} }