Repository navigation
Popups and animations: blurred question cards tinted by the theme, and enter/exit animation fixes - #264
Open
Lenny4250gh wants to merge 13 commits into
Open
Popups and animations: blurred question cards tinted by the theme, and enter/exit animation fixes#264Lenny4250gh wants to merge 13 commits into
Lenny4250gh wants to merge 13 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The question cards (the cancel-unlock and quit popups) stood on a flat dim, and several panels broke or skipped their enter and exit animations. This pull request:
Changes
Question cards: blurred page and theme colour
ui/pageblur.rs(new),screens/dialog.rs,ui/mod.rspageblur::release).dialog::paintpaints the flat scrim first and the blur on top. The scrim stays until the capture arrives (1-2 frames) and under High Contrast. The blur fades in over 0.15 s.pageblur::paint_card). Until the page is captured, and under High Contrast, it is the previous glass panel.ui/theme.rs,ui/background.rsPalette::card_wash(): the deep tone lifted 60% of the way to the middle one (blue on Cosmic, teal on Aurora, wine on Sunset, copper on Ember, petrol on Tide).theme::set_card_wash/theme::card_wash. The backdrop publishes the colour every frame; on Game Colors it uses the selected game's palette.pageblur::paint_cardlays it at 0.38.Animation fixes
ui/chrome.rs,fullscreen_panelanimate_from_to(0.0 -> 1.0)instead ofanimate_to. A panel is drawn only while it is active, so its tracker is born on the frame it opens, andanimate_tostarts a new tracker at its target (no entrance). The first opening appeared at once; from the second on it animated. This affects every panel that usesfullscreen_panel;dialog.rsalready did this.screens/settings.rsset_opacityis replaced bymultiply_opacity. The rows' own fade replaced the panel's fade, so the rows stayed fully opaque while the page closed and vanished in the last frame.app/panels.rs(cancel-unlock and quit cards)returnwhencancel_askisNoneis removed, so the card still goes throughshowand plays its exit. Before, the panel stayed in its closing state with nothing drawing it: it vanished at once, and on the next question it showed for one frame at full strength, left, and only then opened.returnwhenquit_askisNone(after "Go back"), with the same symptoms.quit_uinow goes throughshowtoo; when the question is gone it usesQuitKind::Unlockingas a placeholder kind, since the card draws its exit from what it showed last and the kind only matters while it is open.Docs
docs/DESIGN.mdPalette::card_wash,theme::set_card_wash,pageblur::paint_cardat 0.38).home-cancel-askwith--theme=cosmic|aurora|sunset|ember|tide|daylightshows the card's tint on each theme.Screenshots
Made with the gallery (made-up games, no game art), on the Cosmic theme:
The other themes are reproduced with
--gallery=home-cancel-ask --theme=<name>.Checklist
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass.docs/DESIGN.md, and the pull request shows the gallery screenshots of the changed scenes (--gallery=<scene> --screenshot=<file>).Need help on this PR? Tag
@codesmith-botwith what you need.