fix for quick action btn night theme

This commit is contained in:
madwasp79 2019-06-06 12:12:10 +03:00
parent ac7f765be7
commit ebb10ad223

View file

@ -95,7 +95,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
quickActionButton = (ImageButton) mapActivity.findViewById(R.id.map_quick_actions_button); quickActionButton = (ImageButton) mapActivity.findViewById(R.id.map_quick_actions_button);
setQuickActionButtonMargin(); setQuickActionButtonMargin();
isLayerOn = quickActionRegistry.isQuickActionOn(); isLayerOn = quickActionRegistry.isQuickActionOn();
nightMode = app.getDaynightHelper().isNightModeForMapControls(); nightMode = app.getDaynightHelper().isNightMode();
updateQuickActionButton(false); updateQuickActionButton(false);
quickActionButton.setContentDescription(mapActivity.getString(R.string.configure_screen_quick_action)); quickActionButton.setContentDescription(mapActivity.getString(R.string.configure_screen_quick_action));
quickActionButton.setOnClickListener(new View.OnClickListener() { quickActionButton.setOnClickListener(new View.OnClickListener() {
@ -375,7 +375,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
@Override @Override
public void onDraw(Canvas canvas, RotatedTileBox box, DrawSettings settings) { public void onDraw(Canvas canvas, RotatedTileBox box, DrawSettings settings) {
boolean nightMode = app.getDaynightHelper().isNightModeForMapControls(); boolean nightMode = app.getDaynightHelper().isNightMode();
if (isInMovingMarkerMode()) { if (isInMovingMarkerMode()) {
canvas.translate(box.getCenterPixelX() - contextMarker.getWidth() / 2, box.getCenterPixelY() - contextMarker.getHeight()); canvas.translate(box.getCenterPixelX() - contextMarker.getWidth() / 2, box.getCenterPixelY() - contextMarker.getHeight());
contextMarker.draw(canvas); contextMarker.draw(canvas);