Commit Graph

181 Commits

Author SHA1 Message Date
Dustin Carlino
6e7a91ada1 Upgrade to Rust 1.50. Use the new f64 clamp instead of our own. [rebuild] 2021-02-11 10:32:13 -08:00
Michael Kirk
4b665c871d
update geo related deps. (#508)
geo-types to 0.7
geo to 0.17 which removes redundant old geo used by polylabel
geojson to 0.22
2021-02-08 16:34:56 -08:00
Michael Kirk
3449d49b6d
WebGL 1.0 support, with automatic fallback for Safari/iOS (#504)
#506
2021-02-06 19:04:43 -08:00
Dustin Carlino
3a7f39a6da Downsample points on a line-series plot for drawing. Otherwise, the arrivals plot on a border intersection in downtown winds up with more than 2^16 points. 2021-02-04 11:27:57 -08:00
Dustin Carlino
fd423439b8 Upgrade tokio, hyper, and lru 2021-02-03 18:33:06 -08:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dustin Carlino
eebe7a098a Start a UI with some sliders for tuning existing params of route cost functions. No effect yet. #494 2021-02-02 14:39:39 -08:00
Michael Kirk
38dc60fbea
Add method to GeomBatch to prefer cached flavor of loading svg. (#493)
It was my intention when introducing the cached vs uncached flavors that
we'd prefer the cached flavor for anything referencing bytes from a
file, like icons and UI glyphs, and that we'd only use the uncached
flavor for dynamic things like "face" generation.
2021-02-01 16:24:56 -08:00
Dustin Carlino
3e40686a6b Fix a bunch of links after the repository renaming. 2021-01-31 15:50:48 -08:00
Dustin Carlino
8f0c027bb0 Fix critical bug causing a crash only in the .zip releases, where widgetry icons aren't present relative to the data/ directory. 2021-01-30 14:20:28 -08:00
Dustin Carlino
16124f3f3b Include the vertical scrollbar when calculating panel size for horizontal alignment. Fixes #484 2021-01-28 10:31:47 -08:00
Dustin Carlino
e306a48994 Fix prev/next buttons on the trip table; the keybindings got inverted during the refactor. 2021-01-27 08:57:47 -08:00
Dustin Carlino
cbf0763327 Move 3 SVGs into widgetry icons, bundling them into the build. Discovered these missing by updating https://github.com/dabreegster/streetcad 2021-01-26 14:18:41 -08:00
Dustin Carlino
56101addcf Remove the zcool font and Xi'an import. #377
The Xi'an map isn't being regularly used, and it has some issues
(boundary is too large, OSM is missing buildings in most of the area).

The zcool font enables Chinese characters to render, but costs 6MB in
the binary files, slowing down wasm loading time. Eventually, we can
support async loading fonts and passing them to widgetry when loading a
map requiring them. For now, cutting down wasm size is a bigger
priority.

game wasm from 18MB to 12MB. Not bad!
2021-01-24 20:30:20 -08:00
Michael Kirk
07738d2cef
popup and persistent split to spec (#480)
* introduce "pill" to be explicit about fully rounded, vs a "None" radius

* no-op transition to CornerRadii

* popup button to spec

* restore "fully rounded" layout behavior

* use plain light to better show highlight

* persistent split to spec (for day theme anyway)

* remove night-theme colors for speed panel

* fixup docs for pill

* CR: remove unnecessary `row`

* CR: remove outdated doc

* import order
2021-01-24 15:32:28 -08:00
Dustin Carlino
ab801b8ae1 Vertically line up the header for layer panels. 2021-01-24 13:23:30 -08:00
Dustin Carlino
7d8c818eea Remove the last traces of the old orange hovering color. 2021-01-24 13:09:37 -08:00
Michael Kirk
f71176578f stroke for non-colored checkboxes 2021-01-24 10:32:41 -08:00
Michael Kirk
8211329c6f more contrast in hotkey color 2021-01-24 10:32:41 -08:00
Michael Kirk
1a3d1b4cdb
reconcile new button styles w/ dark theme (#475) 2021-01-22 21:21:38 -08:00
Dustin Carlino
4446d99fad Merge branch 'mkirk/btn-fix' of https://github.com/michaelkirk/abstreet into michaelkirk-mkirk/btn-fix 2021-01-22 21:13:13 -08:00
Michael Kirk
3855f284b8 Fix hotkey conflict
Even though we *usually* want these hotkeys for next/prev, sometimes we
don't, and the damage of forgetting to add them to a new pager is less
than the damage done if we forget to remove them and clobber something
important like the speedup/slowdown controls.
2021-01-22 15:31:33 -06:00
Michael Kirk
1990642dee More conventional button names
This was all done by search/replace, and should not affect
functionality.

Goals:

- be consistent with the figma terminology.
- consistently order:
  "btn_{solid|outline|plain}_{dark|light}_{text|image|dropdown|back|etc}"
2021-01-22 13:11:42 -06:00
Michael Kirk
8579add567 better docs 2021-01-22 10:23:50 -06:00
Michael Kirk
1325c115a1 cache SVG's when reasonable. Clarify when they aren't cached. 2021-01-22 09:54:50 -06:00
Michael Kirk
202aec77cf cleanup with include_labeled_bytes! 2021-01-22 09:54:50 -06:00
Michael Kirk
4e48de6185 compile in asset bytes for widgetry assets 2021-01-22 09:54:50 -06:00
Michael Kirk
7bc9145ce9 bake-in widgetry assets: image_path -> image_source::{Path, Bytes} 2021-01-22 09:54:50 -06:00
Dustin Carlino
dc19d11f64 Make the file management menu in edit mode occupy the center of the screen. 2021-01-21 15:36:21 -08:00
Michael Kirk
79b9d9f961 fix checkbox color for Info > Traffic > "Show before {}" 2021-01-21 15:25:46 -08:00
Michael Kirk
882de86661 Maybe fix weird toggle background 2021-01-21 15:25:46 -08:00
Michael Kirk
e10a8bd2a3 proper its 2021-01-21 15:25:46 -08:00
Michael Kirk
f9fdce9637 replace arrow text with arrow image 2021-01-21 15:25:46 -08:00
Michael Kirk
f218d72390 docs 2021-01-21 15:25:46 -08:00
Michael Kirk
4989887117 remove final references to Btn 2021-01-21 15:25:46 -08:00
Michael Kirk
de527bc9d8 remove unused imports 2021-01-21 15:25:46 -08:00
Michael Kirk
1f75145a8a introduce btn_next/btn_prev, parameterize disabled to simplify common usage 2021-01-21 15:25:46 -08:00
Michael Kirk
bfb190a730 manually update remaining Btn::text_bg2 2021-01-21 15:25:46 -08:00
Michael Kirk
a5b6dca62a replace Btn::text_bg2 w/ regex
In case I have to revisit, here's the regex I used:
    Btn::text_bg2\(([^)]*)\)*.build_def\(ctx, ([^()]*)\)
    ctx.style().btn_primary_dark_text($1).hotkey($2).build_def(ctx)

And something like this for the "no hotkey" case
    Btn::text_bg2\(([^)]*)\)*.build_def\(ctx, None\)
    ctx.style().btn_primary_dark_text($1).build_def(ctx)
2021-01-21 15:25:46 -08:00
Michael Kirk
652c35b220 replace Btn::text_bg 2021-01-21 15:25:46 -08:00
Michael Kirk
54e937408a remove remaining Btn::plaintext 2021-01-21 15:25:46 -08:00
Michael Kirk
3febbf2f81 destructive primary for destructive action 2021-01-21 15:25:46 -08:00
Michael Kirk
0f476b6a36 pagination uses icon button 2021-01-21 15:25:46 -08:00
Michael Kirk
fc6c18e608 replace Btn::SVG 2021-01-21 15:25:46 -08:00
Michael Kirk
69e31029ac replace Btn::svg_def 2021-01-21 15:25:46 -08:00
Michael Kirk
ea39fecf03 replace Btn::pop_up 2021-01-21 15:25:46 -08:00
Michael Kirk
4e5443683b CR: remove unused method 2021-01-21 09:08:41 -08:00
Michael Kirk
0a612601ca icon buttons should be same height as text buttons 2021-01-21 09:08:41 -08:00
Michael Kirk
c013c8d342 replace remaining Btn::custom 2021-01-21 09:08:41 -08:00
Michael Kirk
52880c68d8 replace Btn::custom in switch and checkboxes
(also add SVG checkboxes!)
2021-01-21 09:08:41 -08:00