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
Michael Kirk
5b6c88d3b4
more button progress and fixups ( #465 )
...
* replace Btn::txt with new ButtonBuilder styles
* fixup! replace Btn::text_bg1 with ButtonBuilder (btn_primary_light)
2021-01-20 14:11:28 -08:00
Michael Kirk
11ffef5716
replace Btn::text_bg1 with ButtonBuilder (btn_primary_light)
2021-01-19 17:40:35 -08:00
Michael Kirk
e1ec69f9f7
Replace Btn::plaintext_custom with new ButtonBuilder
2021-01-19 17:40:35 -08:00
Michael Kirk
def3644eca
add "destructive" (red) button styles
2021-01-19 17:40:35 -08:00
Michael Kirk
743b74510d
replace Btn::close with new style ( #463 )
2021-01-19 16:17:11 -08:00
Michael Kirk
d7445d889e
button revamp groundwork ( #459 )
2021-01-19 10:10:18 -08:00
Michael Kirk
356a64ec87
rename INVISIBLE -> CLEAR
...
easier to type name
2021-01-16 21:16:14 -08:00
Michael Kirk
bbe94537ef
impl Debug for GeomBatch
2021-01-16 21:16:14 -08:00
Michael Kirk
a8cbda24e3
Copy/Clone/Debug/PartialEq for EdgeInsets
...
At the moment I just needed Debug, but these others seem likely.
2021-01-16 21:16:14 -08:00
Dustin Carlino
92423ef932
Fix previous change -- forgot to move a draw call into the conditional. For some reason, the problem is only reproducible in release mode on S3, not when serving locally.
...
Ahhh typo in the URL -- it happens when specifying a bad map name.
2021-01-11 16:02:50 -08:00
Dustin Carlino
556a8345bf
Sometimes loading a map on the web tries to draw the previous state when the stack only has one. Not totally sure why, but avoid crashing.
2021-01-11 15:21:27 -08:00
Dustin Carlino
fea3ebbe5b
Change the city picker UI to show cities on the left. After clicking one, open up the overview for that city.
2021-01-08 15:51:22 -08:00
Dustin Carlino
82c1495cc4
Seemingly fix the first screenshot of some maps by double drawing the first tile. Not sure what the problem is or why this appears to fix it.
2021-01-07 20:22:27 -08:00
Dustin Carlino
65b2b581fa
Attempt to take many screenshots of one map at different zoom levels for Leaflet. Various bugs, but progress. #440
2021-01-06 16:33:53 -08:00
Dustin Carlino
5b4a689125
Initial steps to internally refactor buttons. Name action/label/tooltip
...
consistently.
2021-01-06 11:07:24 -08:00
Dustin Carlino
92be9c57ed
Optionally tile screenshots at smaller dimensions than the window. #440
2021-01-06 10:52:22 -08:00
Dustin Carlino
4cf133cc32
Make the new screencaps preserve alpha properly by switching to
...
premultiplied alpha. See option 1 of
https://stackoverflow.com/a/24380226
Upload the "new" screenshots (and lakeslice map)!
2021-01-05 18:28:30 -08:00
Dustin Carlino
7f0cdace5a
Use OpenGL to take screenshots instead of scrot. Benefits:
...
- Simple -- one OpenGL call and feeding to the awesome image crate
- Faster -- seemingly don't need the sleep() for whatever vsync problems
- Portable -- doesn't use the Linux scrot tool
- I can switch windows and wiggle the cursor with impunity while this runs
One disadvantage: screencaps in S3 are now slightly larger PNGs, because
for some reason, the image/gif feature is super slow, even in release
mode.
For now, this makes the process of screenshot diffing map changes
easier. But it also might help with producing raster tiles for Leaflet. #440
Also, had to regenerate lakeslice because of the previous change --
it had an old adaptive signal baked in.
2021-01-05 14:58:31 -08:00
Dustin Carlino
dedb041bdb
Move CameraState to map_gui. Now widgetry has no dependency on abstio! #253
2021-01-04 10:39:15 -08:00
Dustin Carlino
bfa208ce6a
Parameterize widgetry on a way to read SVG files. This is one of the last steps to remove the dependency on abstio. #253
2021-01-04 09:53:24 -08:00
Dustin Carlino
d529ae2e5c
Upgrade usvg and rand
2021-01-04 09:19:54 -08:00
Dustin Carlino
965d999199
Upgrade misc other dependencies
2021-01-03 20:01:27 -08:00
Dustin Carlino
5c04923dff
Split abstio crate out from abstutil. #253
...
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00