fix: match the button overlays with figma, and if the button is transparent, use the overlay directly for hover and pressed states
This commit is contained in:
parent
7b2b8952c6
commit
18b22905e2
2 changed files with 19 additions and 21 deletions
|
|
@ -189,9 +189,21 @@ where
|
|||
|
||||
Component {
|
||||
base: base.clone().into(),
|
||||
hover: over(hovered.clone(), base).into(),
|
||||
pressed: over(pressed, base).into(),
|
||||
selected: over(hovered, base).into(),
|
||||
hover: if base.alpha < 0.001 {
|
||||
hovered.clone()
|
||||
} else {
|
||||
over(hovered.clone(), base).into()
|
||||
},
|
||||
pressed: if base.alpha < 0.001 {
|
||||
pressed.clone()
|
||||
} else {
|
||||
over(pressed.clone(), base).into()
|
||||
},
|
||||
selected: if base.alpha < 0.001 {
|
||||
hovered.clone()
|
||||
} else {
|
||||
over(hovered.clone(), base).into()
|
||||
},
|
||||
selected_text: accent.clone(),
|
||||
focus: accent.clone(),
|
||||
divider: if is_high_contrast {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue