[UI] zoom buttons on small screens fix

Signed-off-by: hemanggs <hemangmanhas@gmail.com>
This commit is contained in:
hemanggs
2025-03-15 17:35:24 +05:30
committed by Konstantin Pastbin
parent 362154aedb
commit aea3fb29ed

View File

@@ -355,7 +355,17 @@ public class MapButtonsController extends Fragment
{
final View button = entry.getValue();
if (button.getParent() == parent)
showButton(getViewTopOffset(translation, button) >= 0, entry.getKey());
{
int toleranceOffset = 0;
// Allow offset tolerance for zoom buttons
switch(entry.getKey())
{
case zoomIn: case zoomOut: case zoom:
toleranceOffset = -140;
break;
}
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
}
}
}