Add small UI fixes
This commit is contained in:
parent
68f944da14
commit
7512403c10
1 changed files with 14 additions and 1 deletions
|
@ -53,6 +53,7 @@ public class OsmNotesMenu {
|
||||||
showOsmBugsPref.set(isChecked);
|
showOsmBugsPref.set(isChecked);
|
||||||
plugin.updateLayers(mapActivity.getMapView(), mapActivity);
|
plugin.updateLayers(mapActivity.getMapView(), mapActivity);
|
||||||
mapActivity.refreshMap();
|
mapActivity.refreshMap();
|
||||||
|
mapActivity.getDashboard().refreshContent(true);
|
||||||
} else if (itemId == showZoomLevelStringId) {
|
} else if (itemId == showZoomLevelStringId) {
|
||||||
int checked = Arrays.asList(zoomIntValues).indexOf(showOsmBugsZoomPref.get());
|
int checked = Arrays.asList(zoomIntValues).indexOf(showOsmBugsZoomPref.get());
|
||||||
|
|
||||||
|
@ -81,12 +82,22 @@ public class OsmNotesMenu {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boolean showOsmBugs = showOsmBugsPref.get();
|
||||||
|
boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
||||||
|
int toggleIconColorId;
|
||||||
|
if (showOsmBugs) {
|
||||||
|
toggleIconColorId = nightMode ? R.color.color_dialog_buttons_dark : R.color.color_dialog_buttons_light;
|
||||||
|
} else {
|
||||||
|
toggleIconColorId = nightMode ? 0 : R.color.icon_color;
|
||||||
|
}
|
||||||
|
|
||||||
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
||||||
.setTitleId(osmNotesStringId, mapActivity)
|
.setTitleId(osmNotesStringId, mapActivity)
|
||||||
.setDescription(mapActivity.getString(R.string.switch_osm_notes_visibility_desc))
|
.setDescription(mapActivity.getString(R.string.switch_osm_notes_visibility_desc))
|
||||||
.setIcon(R.drawable.ic_action_bug_dark)
|
.setIcon(R.drawable.ic_action_bug_dark)
|
||||||
|
.setColor(toggleIconColorId)
|
||||||
.setListener(l)
|
.setListener(l)
|
||||||
.setSelected(showOsmBugsPref.get())
|
.setSelected(showOsmBugs)
|
||||||
.createItem());
|
.createItem());
|
||||||
|
|
||||||
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
||||||
|
@ -95,6 +106,7 @@ public class OsmNotesMenu {
|
||||||
.setLayout(R.layout.list_item_single_line_descrition_narrow)
|
.setLayout(R.layout.list_item_single_line_descrition_narrow)
|
||||||
.setIcon(R.drawable.ic_action_map_magnifier)
|
.setIcon(R.drawable.ic_action_map_magnifier)
|
||||||
.setListener(l)
|
.setListener(l)
|
||||||
|
.setClickable(showOsmBugs)
|
||||||
.createItem());
|
.createItem());
|
||||||
|
|
||||||
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
||||||
|
@ -102,6 +114,7 @@ public class OsmNotesMenu {
|
||||||
.setIcon(R.drawable.ic_action_note_dark)
|
.setIcon(R.drawable.ic_action_note_dark)
|
||||||
.setListener(l)
|
.setListener(l)
|
||||||
.setSelected(showClosedOsmBugsPref.get())
|
.setSelected(showClosedOsmBugsPref.get())
|
||||||
|
.setClickable(showOsmBugs)
|
||||||
.hideDivider(true)
|
.hideDivider(true)
|
||||||
.createItem());
|
.createItem());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue