Implement button::DefaultStyle for Color
This commit is contained in:
parent
34ca5386b5
commit
b8f05eb8dd
1 changed files with 6 additions and 0 deletions
|
|
@ -454,6 +454,12 @@ impl DefaultStyle for Appearance {
|
|||
}
|
||||
}
|
||||
|
||||
impl DefaultStyle for Color {
|
||||
fn default_style() -> Style<Self> {
|
||||
|color, _status| Appearance::with_background(*color)
|
||||
}
|
||||
}
|
||||
|
||||
/// A primary button; denoting a main action.
|
||||
pub fn primary(theme: &Theme, status: Status) -> Appearance {
|
||||
let palette = theme.extended_palette();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue