Merge pull request #7014 from osmandapp/qa_btn_theme_fix

fix for quick action btn night theme
This commit is contained in:
Alexey 2019-06-06 14:47:06 +03:00 committed by GitHub
commit e31a57a551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);