Add weakest and strongest to Background palette
... and tweak background shade generation logic.
This commit is contained in:
parent
f1ed99cb47
commit
954f49d4d7
8 changed files with 76 additions and 31 deletions
|
|
@ -591,12 +591,12 @@ impl Catalog for Theme {
|
|||
/// A primary button; denoting a main action.
|
||||
pub fn primary(theme: &Theme, status: Status) -> Style {
|
||||
let palette = theme.extended_palette();
|
||||
let base = styled(palette.primary.strong);
|
||||
let base = styled(palette.primary.base);
|
||||
|
||||
match status {
|
||||
Status::Active | Status::Pressed => base,
|
||||
Status::Hovered => Style {
|
||||
background: Some(Background::Color(palette.primary.base.color)),
|
||||
background: Some(Background::Color(palette.primary.strong.color)),
|
||||
..base
|
||||
},
|
||||
Status::Disabled => disabled(base),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue