mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 17:34:58 +03:00
style parking lot info like other info panels
This commit is contained in:
parent
a085db301b
commit
494be704da
@ -2,7 +2,9 @@ use std::collections::HashSet;
|
||||
|
||||
use abstutil::prettyprint_usize;
|
||||
use map_model::ParkingLotID;
|
||||
use widgetry::{EventCtx, Line, LinePlot, PlotOptions, Series, StyledButtons, TextExt, Widget};
|
||||
use widgetry::{
|
||||
Color, EventCtx, Line, LinePlot, PlotOptions, Series, StyledButtons, TextExt, Widget,
|
||||
};
|
||||
|
||||
use crate::app::App;
|
||||
use crate::info::{header_btns, make_tabs, Details, Tab};
|
||||
@ -41,17 +43,24 @@ pub fn info(ctx: &mut EventCtx, app: &App, details: &mut Details, id: ParkingLot
|
||||
),
|
||||
});
|
||||
}
|
||||
rows.push("Parking spots available".draw_text(ctx));
|
||||
rows.push(LinePlot::new(
|
||||
ctx,
|
||||
series,
|
||||
PlotOptions {
|
||||
filterable: false,
|
||||
max_x: None,
|
||||
max_y: Some(capacity),
|
||||
disabled: HashSet::new(),
|
||||
},
|
||||
));
|
||||
|
||||
let section = Widget::col(vec![
|
||||
Line("Parking spots available").small_heading().draw(ctx),
|
||||
LinePlot::new(
|
||||
ctx,
|
||||
series,
|
||||
PlotOptions {
|
||||
filterable: false,
|
||||
max_x: None,
|
||||
max_y: Some(capacity),
|
||||
disabled: HashSet::new(),
|
||||
},
|
||||
),
|
||||
])
|
||||
.padding(10)
|
||||
.bg(app.cs.inner_panel_bg)
|
||||
.outline(2.0, Color::WHITE);
|
||||
rows.push(section);
|
||||
|
||||
if app.opts.dev {
|
||||
rows.push(
|
||||
|
Loading…
Reference in New Issue
Block a user