Remove discrepancies

This commit is contained in:
Victor Shcherb 2012-09-12 01:44:51 +02:00
parent 3729c2d6d5
commit bf21216452
3 changed files with 7 additions and 6 deletions

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version="1.0" encoding="utf-8"?>
<resources><string name="show_warnings_title">Warnungen anzeigen…</string> <resources><string name="show_warnings_title">Warnungen anzeigen…</string>
<string name="show_warnings_descr">Warnungen für Tempolimits, stationäre Radarkontrollen, Rüttelschwellen u.Ä.</string> <string name="show_warnings_descr">Warnungen für Tempolimits, stationäre Radarkontrollen, Rüttelschwellen u.Ä.</string>
<string name="use_compass_navigation_descr">Kompass verwenden, wenn keine andere Richtungsbestimmung möglich</string> <string name="use_compass_navigation_descr">Kompass verwenden, wenn keine andere Richtungsbestimmung möglich</string>

View file

@ -222,6 +222,7 @@ public class MapInfoLayer extends OsmandMapLayer {
// register right stack // register right stack
EnumSet<ApplicationMode> all = EnumSet.allOf(ApplicationMode.class); EnumSet<ApplicationMode> all = EnumSet.allOf(ApplicationMode.class);
EnumSet<ApplicationMode> bicyclePedestrian = EnumSet.of(ApplicationMode.BICYCLE, ApplicationMode.PEDESTRIAN); EnumSet<ApplicationMode> bicyclePedestrian = EnumSet.of(ApplicationMode.BICYCLE, ApplicationMode.PEDESTRIAN);
EnumSet<ApplicationMode> exceptCar = EnumSet.of(ApplicationMode.BICYCLE, ApplicationMode.PEDESTRIAN, ApplicationMode.DEFAULT);
EnumSet<ApplicationMode> none = EnumSet.noneOf(ApplicationMode.class); EnumSet<ApplicationMode> none = EnumSet.noneOf(ApplicationMode.class);
RoutingHelper routingHelper = view.getApplication().getRoutingHelper(); RoutingHelper routingHelper = view.getApplication().getRoutingHelper();
NextTurnInfoControl bigInfoControl = ric.createNextInfoControl(routingHelper, view.getApplication(), view.getSettings(), paintText, NextTurnInfoControl bigInfoControl = ric.createNextInfoControl(routingHelper, view.getApplication(), view.getSettings(), paintText,
@ -249,9 +250,9 @@ public class MapInfoLayer extends OsmandMapLayer {
ImageViewControl compassView = createCompassView(map); ImageViewControl compassView = createCompassView(map);
mapInfoControls.registerTopWidget(compassView, R.drawable.compass, R.string.map_widget_compass, "compass", MapInfoControls.LEFT_CONTROL, all, 5); mapInfoControls.registerTopWidget(compassView, R.drawable.compass, R.string.map_widget_compass, "compass", MapInfoControls.LEFT_CONTROL, all, 5);
View config = createConfiguration(); View config = createConfiguration();
mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.string.map_widget_config, "config", MapInfoControls.RIGHT_CONTROL, all, 10).required(ApplicationMode.values()); mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.string.map_widget_config, "config", MapInfoControls.RIGHT_CONTROL, all, 10).required(ApplicationMode.DEFAULT);
ImageView lockView = lockInfoControl.createLockScreenWidget(view, map); ImageView lockView = lockInfoControl.createLockScreenWidget(view, map);
mapInfoControls.registerTopWidget(lockView, R.drawable.lock_enabled, R.string.bg_service_screen_lock, "bgService", MapInfoControls.LEFT_CONTROL, all, 15); mapInfoControls.registerTopWidget(lockView, R.drawable.lock_enabled, R.string.bg_service_screen_lock, "bgService", MapInfoControls.LEFT_CONTROL, exceptCar, 15);
backToLocation = createBackToLocation(map); backToLocation = createBackToLocation(map);
mapInfoControls.registerTopWidget(backToLocation, R.drawable.default_location, R.string.map_widget_back_to_loc, "back_to_location", MapInfoControls.RIGHT_CONTROL, all, 5); mapInfoControls.registerTopWidget(backToLocation, R.drawable.default_location, R.string.map_widget_back_to_loc, "back_to_location", MapInfoControls.RIGHT_CONTROL, all, 5);
View globus = createGlobus(); View globus = createGlobus();
@ -808,7 +809,7 @@ public class MapInfoLayer extends OsmandMapLayer {
pp.setTextSize(20 * scaleCoefficient); pp.setTextSize(20 * scaleCoefficient);
float ts = pp.measureText(text); float ts = pp.measureText(text);
int wth = getWidth(); int wth = getWidth();
while (ts > wth && pp.getTextSize() > (14 * scaleCoefficient)) { while (ts > wth && pp.getTextSize() > (16 * scaleCoefficient)) {
pp.setTextSize(pp.getTextSize() - 1); pp.setTextSize(pp.getTextSize() - 1);
ts = pp.measureText(text); ts = pp.measureText(text);
} }

View file

@ -124,9 +124,9 @@ public class NextTurnInfoControl extends MapInfoControl {
float mt = textPaint.measureText(text); float mt = textPaint.measureText(text);
if (!horisontalMini) { if (!horisontalMini) {
float startX = Math.max((getWWidth() - st - mt) / 2, 2 * scaleCoefficient); float startX = Math.max((getWWidth() - st - mt) / 2, 2 * scaleCoefficient);
drawShadowText(canvas, text, startX, getWHeight() - 3 * scaleCoefficient, textPaint); drawShadowText(canvas, text, startX, getWHeight() - 5 * scaleCoefficient, textPaint);
if (subtext != null) { if (subtext != null) {
drawShadowText(canvas, subtext, startX + 2 * scaleCoefficient + mt, getWHeight() - 4 * scaleCoefficient, subtextPaint); drawShadowText(canvas, subtext, startX + 2 * scaleCoefficient + mt, getWHeight() - 5 * scaleCoefficient, subtextPaint);
} }
} else { } else {
drawShadowText(canvas, text, 72 * scaleCoefficient / miniCoeff + 2 * scaleCoefficient, drawShadowText(canvas, text, 72 * scaleCoefficient / miniCoeff + 2 * scaleCoefficient,