Commit Graph

270 Commits

Author SHA1 Message Date
Dustin Carlino
ef7cbdcf48 Generalize LinePlot to handle any kind of X-axis, not just time. #82
Also split out some common code to a plots module. Fan charts and
scatter plots are still hardcoded to use Time as the X-axis and
duplicate lots of code, but this is a step towards refactoring
everything.
2021-03-26 12:07:21 -07:00
Dustin Carlino
73a31d1633 Add a line plot showing the elevation of the route taken by pedestrians
and cyclists. Add support for Distance as the Y axis of a LinePlot. #82
2021-03-26 12:07:21 -07:00
Dustin Carlino
2c1c18d34a Upgrade glow 2021-03-25 15:23:13 -07:00
Michael Kirk
e672256828
Import screen UI fixups (#584)
* Import screen UI fixups

- even out the spacing a bit
- use underline style for "Alternate Instructions" web link
- left/right switch is more intuitive than right/left
- disambiguate label from toggle id
2021-03-23 15:11:14 -07:00
Michael Kirk
b07ac626d4 fixup proposal "tabs" 2021-03-22 12:00:43 -07:00
Michael Kirk
761e2e6412 new tab styles for info panels 2021-03-20 14:33:54 -07:00
Michael Kirk
af079c24e6 rename txt.add -> txt.add_line 2021-03-19 17:48:30 -07:00
Michael Kirk
affd582093 more concise Text / tooltip() 2021-03-19 16:48:54 -07:00
Dustin Carlino
edfb745bb2 Change the default color scheme to day mode. Behaviorally, this rolls out the change for the OSM viewer, 15m app, parking mapper, and map_editor. 2021-03-19 15:26:35 -07:00
Michael Kirk
2de212438f fix comment typos 2021-03-19 12:43:32 -07:00
Michael Kirk
62180432b9 increase tab contrast a bit more in dark theme 2021-03-19 11:56:22 -07:00
Michael Kirk
014bd56379 CR: clarify swap_inner_content method 2021-03-19 11:56:22 -07:00
Michael Kirk
8b685fd746 increase contrast of panel_bg vs the panel_section
Currently the color was only via transparency - so depending on what was
behind the panel, there was sometimes not enough contrast.
2021-03-19 11:56:22 -07:00
Michael Kirk
e493c02d83 convert trip tables to new tabs
The GenericTable machinery lost a lot of it's utility now that we have
proper tabs. I've left a couple of free functions to be shared, and
inlined the remaining simple functionality.
2021-03-19 11:56:22 -07:00
Michael Kirk
e39059644c fixup! wip apply tabs to TimeWarp 2021-03-19 11:56:22 -07:00
Michael Kirk
02d08fa262 fixup! style tabs 2021-03-19 11:56:22 -07:00
Michael Kirk
1d57bb5f25 wip apply tabs to TimeWarp 2021-03-19 11:56:22 -07:00
Michael Kirk
7f00154ae6 style tabs 2021-03-19 11:56:22 -07:00
Michael Kirk
ab787a5cd1 WIP: spiked tabs implementation for widgetry demo
TODO:
- tooltips (or is that just a responsibility of the button builder?)
- widgetry color scheme should use day-theme
- pick nice tab colors
- start applying!
  - jump in time
  - info panel
  - "more data"
  - fix width to match widest? Or maybe width modes?
2021-03-19 11:56:22 -07:00
Michael Kirk
a0ad4bd762 fixup! Replace ButtonImage with Image
Apply default tint to icons unless specified as untinted
2021-03-18 11:02:41 -07:00
Michael Kirk
546599e4f9 Replace ButtonImage with Image 2021-03-17 19:06:43 -07:00
Dustin Carlino
1773782975 Place layer panels and info panels in the same place, on the left side of the screen. Simplify layer code, now that we don't need to align relative to the minimap. 2021-03-17 14:15:13 -07:00
Michael Kirk
4418c94fd6 fixup! minimap controls: agent toggles and meters into one row 2021-03-16 18:28:50 -07:00
Michael Kirk
264f1f939f minimap controls: agent toggles and meters into one row
Some ancillary changes:

Made the GeomBatchStack public and extracted the ImageSource
functionality from ButtonBuilder to Image.
2021-03-16 18:28:50 -07:00
Michael Kirk
810c89eeb1
meter shows "finished trips vs baseline" instead of time (#565) 2021-03-15 17:10:08 -07:00
Dustin Carlino
59e9735318 Force actdev top panels to have the same height. #551 2021-03-12 17:48:35 -08:00
Dustin Carlino
8ac62fed47 Trying out some UI changes suggested by Martin:
- Increase day mode panel opacity to 95% to help text legibility
- Combine the time/speed panels, and remove the sunrise/sunset icons
- 4 mode colors matching actdev, also changing night mode residential
  buildings
2021-03-12 17:48:35 -08:00
Dustin Carlino
522b902453 Improve the traffic signal timing UI. There's a choice between fixed and
variable timing, but currently you have to remember to toggle it; the
two extra spinners get ignored otherwise. The new version is still
confusing, but I think it's an improvement.
2021-03-11 11:39:58 -08:00
Dustin Carlino
8be24bf007 Use AsRef<str> in more widgetry methods, getting rid of &format at many
call-sites. #253

To make some of these work, changed Label to store a String. Ultimately
it gets transformed into Text, so we need to allocate eventually.
2021-03-11 11:29:18 -08:00
Dustin Carlino
9c2c8bbd8f Change some uses of Into<String> to AsRef<str>, to avoid allocations. #253
I manually audited all uses. I kept Into<String> when we really do wind
up storing a String.
2021-03-11 11:29:18 -08:00
Dustin Carlino
f5eca6ff02
Seemingly fix squished loading screens at startup by always using inner_size. (#561) 2021-03-11 09:48:39 -08:00
Dustin Carlino
65d7bc5c8e Rename {Text,TextSpan}::draw to into_widget, for consistency. #253 2021-03-09 09:59:30 -08:00
Dustin Carlino
a4a20ce1e5 draw_text renamed to text_widget, for consistency. #253 2021-03-09 09:56:41 -08:00
Dustin Carlino
b0bcdb2115
Replace Widget::draw_batch with batch.into_widget, for consistency. #253 (#554) 2021-03-09 08:55:12 -08:00
Dustin Carlino
42bd63e79b Lift URL and viewport code from game to map_gui. Also use it for OSM viewer and the 15min tool. 2021-03-04 13:22:09 -08:00
Dustin Carlino
4d048d83bd A few misc fixes after the grand button/color refactor:
- Always draw traffic signal stage numbers as white, even in day mode
- Always draw loading screen text as white, in any theme
- Double the scrollbar thickness from 4px to 8px (still way thinner than
  the original design)

[rebuild] [release]
2021-02-28 10:31:00 -08:00
Michael Kirk
09c98b99c7
better contrast for primary button when disabled (#548) 2021-02-27 21:11:03 -08:00
Michael Kirk
86799e2832 Remove StyledButtons - instead implement everything on the individual
ButtonStyle
2021-02-27 21:08:26 -08:00
Michael Kirk
703ab1a0e8 inline dark style since we were assigning most of the props via overrides anyway 2021-02-27 21:08:26 -08:00
Michael Kirk
11a904a4da WIP: separate style for plain 2021-02-27 21:08:26 -08:00
Michael Kirk
6b35060dbb inline more functionality into ButtonStyle 2021-02-27 21:08:26 -08:00
Michael Kirk
c3985ffdd1 btn_solid -> btn_tab and replace inappropriate uses 2021-02-27 21:08:26 -08:00
Michael Kirk
7fe0e521ee Use btn_destructive.* methods instead of btn_destructive_* 2021-02-27 21:08:26 -08:00
Michael Kirk
cee0e5dbbd Use btn_primary.* methods instead of btn_primary_* 2021-02-27 21:08:26 -08:00
Michael Kirk
87a1a3f027 fix outline for spinner (without crashing!) and cache drawable 2021-02-27 15:29:03 -08:00
Michael Kirk
088e434a0a Revert "Fix too-thin outline of Spinner"
This reverts commit 9dc2b365c8.
2021-02-27 15:29:03 -08:00
Michael Kirk
27b20c45c8 make EdgeInset f64, like other layout
Remove unnecessary casts to f64
2021-02-27 13:14:37 -08:00
Michael Kirk
9dc2b365c8 Fix too-thin outline of Spinner 2021-02-27 13:13:41 -08:00
Michael Kirk
1e75352ce0 Theme section bg
`Widget::outline` takes OutlineStyle
2021-02-27 13:13:41 -08:00
Michael Kirk
73280bc114 consolidate OutlineStyle
We had a lot of constants sprinkled around. This consolidates the
constants and packages the outline thickness and color into a tuple,
making for a (usually) cleaner callsite.
2021-02-27 13:13:41 -08:00