island: the pill gets the card's faint pink glow
one pink glow for the pill and the open card (opacity 0.3, blur 22), 0.7 while the pill is hovered; the dark drop shadow is gone. same single shadow as before, so no extra cost (pill 1.3 ms gpu)
This commit is contained in:
+5
-12
@@ -290,19 +290,12 @@ pub fn view() -> LayerWindow {
|
||||
.border(1.0, Color::blend(EDGE, faded(PINK, 110), lift));
|
||||
|
||||
/*
|
||||
* one shadow, three looks: a dark drop shadow under the pill, a pink centred glow
|
||||
* when the pill is hovered, and a faint pink glow around the open card. blur 22
|
||||
* fades out within ~28 px (amane blurs with a deviation of blur / 2), inside the
|
||||
* window's SHADOW margin. no clip anywhere: neither face ever overflows the shape
|
||||
* one faint pink glow around the island, pill and card alike, stronger while the
|
||||
* pill is hovered. blur 22 fades out within ~28 px (amane blurs with a deviation
|
||||
* of blur / 2), inside the window's SHADOW margin. no clip anywhere: neither face
|
||||
* ever overflows the shape
|
||||
*/
|
||||
let glow = lift.max(reveal);
|
||||
|
||||
let shape = shape.shadow(
|
||||
Shadow::drop(Color::blend(Color::BLACK, PINK, glow))
|
||||
.opacity(mix(mix(0.55, 0.7, lift), 0.3, reveal))
|
||||
.blur(mix(mix(24.0, 20.0, lift), 22.0, reveal))
|
||||
.offset(0.0, mix(10.0, 0.0, glow)),
|
||||
);
|
||||
let shape = shape.shadow(Shadow::drop(PINK).opacity(mix(0.3, 0.7, lift)).blur(22.0));
|
||||
|
||||
let shape = shape
|
||||
.align_child(Center, Start)
|
||||
|
||||
Reference in New Issue
Block a user