Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-04-01 22:38:48 +02:00
commit bc7eee2005
27 changed files with 52 additions and 28 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -15,7 +15,7 @@
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_gravity="center_vertical"
tools:src="@drawable/ic_action_info_dark" />
tools:src="@drawable/ic_action_gabout_dark" />
<TextView
android:id="@+id/title"

View file

@ -87,7 +87,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/options_button_background"
android:src="@drawable/ic_action_info_dark"/>
android:src="@drawable/ic_action_gabout_dark"/>
</LinearLayout>
<TextView

View file

@ -18,7 +18,7 @@
<dimen name="map_alarm_bottom_margin">140dp</dimen>
<dimen name="map_alarm_bottom_margin_land">78dp</dimen>
<dimen name="map_button_shadow_height">127dp</dimen>
<dimen name="map_button_shadow_height">112dp</dimen>
<dimen name="map_widget_icon">32dp</dimen>
<dimen name="map_widget_height">48dp</dimen>
<dimen name="map_widget_image">120dp</dimen>

View file

@ -134,11 +134,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
arrowResId = R.drawable.ic_destination_arrow_white;
}
DirectionDrawable dd = (DirectionDrawable) arrow.getDrawable();
if (paint) {
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
} else {
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_white);
}
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
if (fromLoc == null || h == null) {
dd.setAngle(0);
} else {

View file

@ -185,7 +185,7 @@ public class GpxUiHelper {
s = s.replace('_', ' ');
adapter.item(s).selected(multipleChoice ? 0 : -1)
.iconColor(R.drawable.ic_action_info_dark).reg();
.iconColor(R.drawable.ic_action_polygom_dark).reg();
//if there's some selected files - need to mark them as selected
if (selectedGpxList != null) {

View file

@ -472,7 +472,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
menuItem.setTitleCondensed(getString(R.string.osmo_follow));
}
if (group != null) {
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_dark,
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_gabout_dark,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
}
if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) {
@ -888,7 +888,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
}
};
ImageButton info = (ImageButton) v.findViewById(R.id.info);
info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_info_dark));
info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_gabout_dark));
info.setOnClickListener(click);
warnCreateDesc.setOnClickListener(click);

View file

@ -4,6 +4,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -11,7 +12,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandPlugin;
@ -19,6 +19,7 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashLocationFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.views.DirectionDrawable;
import java.util.Calendar;

View file

@ -487,7 +487,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());
if(selectedStage != null) {
adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_info_dark).position(0)
adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_gabout_dark).position(0)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
@ -561,7 +561,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
}).reg();
}
//important info
adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_info_dark)
adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_gabout_dark)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {

View file

@ -33,15 +33,16 @@ public class DirectionDrawable extends Drawable {
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, clrId);
this.resourceId = resourceId;
onBoundsChange(getBounds());
}
public void setImage(int resourceId){
public void setImage(int resourceId) {
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, 0);
this.resourceId = resourceId;
onBoundsChange(getBounds());
}
public DirectionDrawable(Context ctx, float width, float height) {
this.ctx = ctx;
this.width = width;
@ -75,23 +76,49 @@ public class DirectionDrawable extends Drawable {
this.angle = angle;
}
@Override
public int getIntrinsicWidth() {
if (arrowImage != null) {
return arrowImage.getIntrinsicWidth();
}
return super.getIntrinsicWidth();
}
@Override
public int getIntrinsicHeight() {
if (arrowImage != null) {
return arrowImage.getIntrinsicHeight();
}
return super.getIntrinsicHeight();
}
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
if (arrowImage != null) {
Rect r = getBounds();
int w = arrowImage.getIntrinsicWidth();
int h = arrowImage.getIntrinsicHeight();
int dx = r.width() - w;
int dy = r.height() - h;
arrowImage.setBounds(r.left + dx / 2, r.top + dy / 2, r.right - dx / 2, r.bottom - dy / 2);
}
}
@Override
public void draw(Canvas canvas) {
canvas.save();
if (arrowImage != null) {
canvas.rotate(angle, canvas.getHeight() / 2, canvas.getWidth() / 2);
arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
Rect r = getBounds();
canvas.rotate(angle, r.centerX(), r.centerY());
arrowImage.draw(canvas);
// TODO delete?
// Bitmap arrow = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
// Canvas canv = new Canvas(arrow);
// arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
// arrowImage.draw(canv);
// canvas.drawBitmap(arrow, null, new Rect(0, 0, arrow.getHeight(), arrow.getWidth()), null);
} else {
canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth() / 2);
canvas.rotate(angle, canvas.getWidth() / 2, canvas.getHeight() / 2);
Path directionPath = createDirectionPath();
canvas.drawPath(directionPath, paintRouteDirection);
}
canvas.restore();
}
@Override

View file

@ -453,7 +453,7 @@ public class MapControlsLayer extends OsmandMapLayer {
// && (!routeFollowingMode || settings.SHOW_ZOOM_BUTTONS_NAVIGATION.get());
boolean showButtons = routePlanningMode || !routeFollowingMode || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS);
updateMyLocation(rh);
routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_info_dark : R.drawable.ic_action_gdirections_dark );
routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.ic_action_gdirections_dark );
routePlanningBtn.updateVisibility(showButtons && !routePlanningMode);
menuControl.setIconResId(settings.USE_DASHBOARD_INSTEAD_OF_DRAWER.get() ? R.drawable.ic_dashboard_dark