Now that @michaelkirk figured out how to preserve space, use it in a few more places in the UI. There are a few remaining places in the tutorial that use "- ", but I think the bullet point style is reasonable there. Maybe a Unicode dot would look better.

This commit is contained in:
Dustin Carlino 2020-08-28 16:35:10 -07:00
parent db5b1622ad
commit 00840f1bbc
4 changed files with 8 additions and 6 deletions

View File

@ -162,7 +162,7 @@ impl State for PopularDestinations {
)));
for (names, amenity) in &app.primary.map.get_b(b).amenities {
txt.add(Line(format!(
"- {} ({})",
" {} ({})",
names.get(app.opts.language.as_ref()),
amenity
)));

View File

@ -580,7 +580,7 @@ fn make_side_panel(
);
}
for r in road_names {
txt.add(Line(format!("- {}", r)));
txt.add(Line(format!(" {}", r)));
}
} else {
txt.add(Line(format!("{} intersections", members.len())).big_heading_plain());

View File

@ -45,12 +45,14 @@ pub fn info(ctx: &mut EventCtx, app: &App, details: &mut Details, id: BuildingID
if !b.amenities.is_empty() {
txt.add(Line(""));
if b.amenities.len() > 1 {
if b.amenities.len() == 1 {
txt.add(Line("1 amenity:"));
} else {
txt.add(Line(format!("{} amenities:", b.amenities.len())));
}
for (names, amenity) in &b.amenities {
txt.add(Line(format!(
"- {} ({})",
" {} ({})",
names.get(app.opts.language.as_ref()),
amenity
)));

View File

@ -362,7 +362,7 @@ pub fn schedule(
};
rows.push(
Text::from(Line(format!(
"- Spends {} at {}",
" Spends {} at {}",
trip.departure - last_t,
at
)))
@ -391,7 +391,7 @@ pub fn schedule(
};
rows.push(
Text::from(Line(format!(
"- Spends {} at {}",
" Spends {} at {}",
app.primary.sim.get_end_of_day() - last_trip.departure,
at
)))