diff --git a/OsmAnd/res/values-large/sizes.xml b/OsmAnd/res/values-large/sizes.xml index a2af789a5e..00e5606654 100644 --- a/OsmAnd/res/values-large/sizes.xml +++ b/OsmAnd/res/values-large/sizes.xml @@ -1,6 +1,6 @@ - 120dp + 120dp 35sp 33sp 23sp @@ -29,7 +29,7 @@ 140dp 81dp - + 36dp 48dp 120dp @@ -120,13 +120,14 @@ 20dp 23dp - 180dp - 24dp - 60dp + 180dp + 24dp + 60dp 450dp 54dp - 64dp + 64dp + 24dp \ No newline at end of file diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index e3181e5c0b..6383e285c7 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -90,6 +90,7 @@ 16dp 34dp 24dp + 16dp 3dp 14dp 6dp diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java index 49a03a8cf2..828b08d20d 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java @@ -203,7 +203,8 @@ public class AudioNotesLayer extends OsmandMapLayer implements public void getRecordingsFromPoint(PointF point, RotatedTileBox tileBox, List am) { int ex = (int) point.x; int ey = (int) point.y; - int compare = getRadiusPoi(tileBox); + float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get(); + int compare = getRadiusPoi(tileBox) * (int) textScale; int radius = compare * 3 / 2; for (Recording n : plugin.getAllRecordings()) { int x = (int) tileBox.getPixXFromLatLon(n.getLatitude(), n.getLongitude()); diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index 366da4afd5..18ccf6117b 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -21,7 +21,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RequiresPermission; import androidx.appcompat.content.res.AppCompatResources; -import androidx.core.content.ContextCompat; import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; @@ -223,15 +222,21 @@ public class ContextMenuLayer extends OsmandMapLayer { } } } + float scale = 1f; + if (!pressedLatLonSmall.isEmpty() || !pressedLatLonFull.isEmpty()) { + scale = activity.getMyApplication().getSettings().TEXT_SCALE.get(); + } for (LatLon latLon : pressedLatLonSmall) { int x = (int) box.getPixXFromLatLon(latLon.getLatitude(), latLon.getLongitude()); int y = (int) box.getPixYFromLatLon(latLon.getLatitude(), latLon.getLongitude()); - canvas.drawBitmap(pressedBitmapSmall, x - pressedBitmapSmall.getWidth() / 2, y - pressedBitmapSmall.getHeight() / 2, paint); + Rect destRect = getIconDestinationRect(x, y, pressedBitmapSmall.getWidth(), pressedBitmapSmall.getHeight(), scale); + canvas.drawBitmap(pressedBitmapSmall, null, destRect, paint); } for (LatLon latLon : pressedLatLonFull) { int x = (int) box.getPixXFromLatLon(latLon.getLatitude(), latLon.getLongitude()); int y = (int) box.getPixYFromLatLon(latLon.getLatitude(), latLon.getLongitude()); - canvas.drawBitmap(pressedBitmap, x - pressedBitmap.getWidth() / 2, y - pressedBitmap.getHeight() / 2, paint); + Rect destRect = getIconDestinationRect(x, y, pressedBitmap.getWidth(), pressedBitmap.getHeight(), scale); + canvas.drawBitmap(pressedBitmap, null, destRect, paint); } if (mapQuickActionLayer != null && mapQuickActionLayer.isInMovingMarkerMode()) diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 32f867b2ce..d946d8d55b 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -154,7 +154,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon int ex = (int) point.x; int ey = (int) point.y; final int rp = getRadiusPoi(tb); - int compare = rp; + float textScale = app.getSettings().TEXT_SCALE.get(); + int compare = rp * (int) textScale; int radius = rp * 3 / 2; try { for (int i = 0; i < objects.size(); i++) { diff --git a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java index 9067054f85..12a8ae8139 100644 --- a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java @@ -144,7 +144,8 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa List objects) { int ex = (int) point.x; int ey = (int) point.y; - final int rp = getRadiusPoi(tb); + float textScale = mapActivity.getMyApplication().getSettings().TEXT_SCALE.get(); + final int rp = getRadiusPoi(tb) * (int) textScale; int radius = rp * 3 / 2; try { TreeSet ms = new TreeSet<>();