use a locate icon button in a few places

This commit is contained in:
Dustin Carlino 2020-01-16 15:34:30 -08:00
parent 5966460527
commit 497d05552a
2 changed files with 23 additions and 9 deletions

View File

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 29.343C17.786 27.79 26.5 19.809 26.5 12C26.5 6.21 21.79 1.5 16 1.5C10.21 1.5 5.5 6.21 5.5 12C5.5 19.809 14.214 27.79 16 29.343Z" fill="#CC4121"/>
<path d="M16 17.5C19.0376 17.5 21.5 15.0376 21.5 12C21.5 8.96243 19.0376 6.5 16 6.5C12.9624 6.5 10.5 8.96243 10.5 12C10.5 15.0376 12.9624 17.5 16 17.5Z" fill="#FFFAEE"/>
<path d="M16 1C9.925 1 5 5.925 5 12C5 21 16 30 16 30C16 30 27 21 27 12C27 5.925 22.075 1 16 1ZM16 28.677C13.71 26.629 6 19.202 6 12C6 6.486 10.486 2 16 2C21.514 2 26 6.486 26 12C26 19.202 18.29 26.629 16 28.677ZM16 6C12.686 6 10 8.686 10 12C10 15.314 12.686 18 16 18C19.314 18 22 15.314 22 12C22 8.686 19.314 6 16 6ZM16 17C13.243 17 11 14.757 11 12C11 9.243 13.243 7 16 7C18.757 7 21 9.243 21 12C21 14.757 18.757 17 16 17Z" fill="#231F20"/>
</svg>

After

Width:  |  Height:  |  Size: 873 B

View File

@ -561,8 +561,14 @@ impl Overlays {
}
let mut col = vec![ManagedWidget::row(vec![
// TODO Say which intersection? And have a location icon to jump to it
crate::managed::Composite::text_button(ctx, "intersection demand", None),
ManagedWidget::draw_text(ctx, Text::from(Line("intersection demand"))),
ManagedWidget::btn(Button::rectangle_svg(
"assets/tools/locate.svg",
"intersection demand",
None,
RewriteColor::Change(Color::hex("#CC4121"), Color::ORANGE),
ctx,
)),
crate::managed::Composite::text_button(ctx, "X", None).align_right(),
])];
col.extend(ColorLegend::rows(ctx, vec![("current demand", Color::RED)]));
@ -595,13 +601,16 @@ impl Overlays {
.get_analytics()
.bus_passenger_delays(ui.primary.sim.time(), id);
for idx in 0..route.stops.len() {
let mut row = vec![ManagedWidget::btn(Button::text_no_bg(
Text::from(Line(format!("Stop {}", idx + 1))),
Text::from(Line(format!("Stop {}", idx + 1)).fg(Color::ORANGE)),
None,
&format!("Stop {}", idx + 1),
ctx,
))];
let mut row = vec![
ManagedWidget::draw_text(ctx, Text::from(Line(format!("Stop {}", idx + 1)))),
ManagedWidget::btn(Button::rectangle_svg(
"assets/tools/locate.svg",
&format!("Stop {}", idx + 1),
None,
RewriteColor::Change(Color::hex("#CC4121"), Color::ORANGE),
ctx,
)),
];
if let Some(hgram) = delay_per_stop.remove(&route.stops[idx]) {
row.push(ManagedWidget::draw_text(
ctx,