S016: chrome and menus redesign: pill tabs on springs, address pill, toolbar badges, page card, floating flyouts
Tabs slide to their slots with a sliding selection pill and drag under the pointer; the address field is a pill with a site chip, host emphasis and a star that fills; flyouts and menus share one floating surface that springs open and fades closed. Web page corners are masked over the GL blit. tests/smoke/chrome.txt shoots the chrome and every flyout dark and light. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
0d81f02cf1
commit
72d06510b2
1 changed files with 1758 additions and 722 deletions
|
|
@ -465,6 +465,13 @@ pub fn spring(ctx: &Context, id: Id, target: f32, spring: Spring) -> f32 {
|
|||
value
|
||||
}
|
||||
|
||||
/// Puts a spring at `value`, at rest: for things that follow the pointer (a dragged tab) and spring from there once
|
||||
/// let go, or that must not animate (a window resize).
|
||||
pub fn spring_jump(ctx: &Context, id: Id, value: f32) {
|
||||
let frame = ctx.cumulative_frame_nr();
|
||||
ctx.data_mut(|d| d.insert_temp(id, SpringState { value, velocity: 0.0, frame }));
|
||||
}
|
||||
|
||||
/// A 0..1 value for an on/off state with the `EFFECT` spring: hover and selection tints, fades.
|
||||
pub fn effect(ctx: &Context, id: Id, on: bool) -> f32 {
|
||||
spring(ctx, id, if on { 1.0 } else { 0.0 }, EFFECT).clamp(0.0, 1.0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue