Commit Graph

2120 Commits

Author SHA1 Message Date
Dustin Carlino
f93a30ea04 Recreate panels whenever the color scheme changes, whether that happens from fiddling with settings or the day/night toggle happening. 2021-01-23 16:35:09 -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
87fe16b6ad use proper button in pager
broken in the recent button overhaul
2021-01-22 15:30:42 -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
1325c115a1 cache SVG's when reasonable. Clarify when they aren't cached. 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
2505d64e8b Always use ctx.style() to construct buttons. Remove the indirection through app's colorscheme. 2021-01-22 07:45:05 -08:00
Michael Kirk
ca93d438db fixup tabs 2021-01-22 07:44:46 -08:00
Dustin Carlino
c9c6f240ae Remove timer.{note, warn, error} in favor of the log crate. #262
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.

Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08: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
02e3235de2 adapt tabs to new button designs 2021-01-21 15:25:46 -08:00
Michael Kirk
2b8511251a fix scaling: replace remaining buttons with baked-in-text 2021-01-21 15:25:46 -08:00
Michael Kirk
90b6da7265 apply new delete icon, fix button spacing in signal editor 2021-01-21 15:25:46 -08:00
Michael Kirk
600d91896e remove redundant edit.svg, use pencil.svg 2021-01-21 15:25:46 -08:00
Michael Kirk
116edc5423 Fix missized lane editing tools 2021-01-21 15:25:46 -08:00
Michael Kirk
6920d324f7 v-align alert 2021-01-21 15:25:46 -08:00
Michael Kirk
4454b4a50f capture "disabled" pattern 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
542600da2f Replace Btn::fg_text.inactive 2021-01-21 15:25:46 -08:00
Michael Kirk
2b8e77de9f manual replace of remaining hotkey Btn::text_fg 2021-01-21 15:25:46 -08:00
Michael Kirk
0cf49d2fc6 proper color for "Trash" (delete) buttons 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
b924d40daa regex update Btn::text_fg simple hotkeys, inline &str 2021-01-21 15:25:46 -08:00
Michael Kirk
a2c5ce0fb3 regex upgrade Btn::text_fg: No hotkeys, inline &str
Btn\:\:text_fg\("([^"]*)"\).build_def\(ctx, None\)
ctx.style().btn_secondary_light_text("$1").build_def(ctx)
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
7270ff31af use icon button for "jump to time" 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
f382c08d55 replace text arrows with svg arrows for traffic signal editor 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
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
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
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
Dustin Carlino
a6c61e4fae Use Great Kneighton study area for Cambridge, not Trumpington. And bring
in Chapelford too. #449
2021-01-17 17:35:11 -08:00
Dustin Carlino
8928256909 Enable the scenario modifiers UI for all scenarios in sandbox mode, not just the Soundcast-based ones. No reason not to do this earlier; I originally was working on this tool for a specific purpose. 2021-01-14 09:28:28 -08:00
Dustin Carlino
e233012ee8 Use a full modal to select a scenario. During the button UI audit, we
realized a dropdown doesn't make sense. A larger panel gives room to
explain what the choices mean.
2021-01-14 09:05:44 -08:00
Robin Lovelace
4696134871 Change dropdown menu title, close #453 2021-01-14 08:23:57 -08:00
Dustin Carlino
38fa22d4b2 Include the importer in the release again -- I accidentally stopped
about a month ago and noticed in #452
2021-01-13 10:52:07 -08:00