diff options
| author | pml68 <contact@pml68.dev> | 2025-07-22 19:51:48 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-07-22 19:51:48 +0200 |
| commit | b94b290265ec3474723456b474f94c6cc7db0efa (patch) | |
| tree | 64054e13c07b621ce349c3ba2d5c05f864bce362 | |
| parent | chore: necessary updates for iced master (diff) | |
| download | iced_material-b94b290265ec3474723456b474f94c6cc7db0efa.tar.gz | |
feat: make `button::styled` public
| -rw-r--r-- | src/button.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/button.rs b/src/button.rs index 2800ac4..7a35e10 100644 --- a/src/button.rs +++ b/src/button.rs @@ -19,7 +19,7 @@ impl Catalog for Theme { } } -fn button( +pub fn styled( background: Color, foreground: Color, disabled: Color, @@ -75,7 +75,7 @@ pub fn elevated(theme: &Theme, status: Status) -> Style { let shadow_color = theme.colors().shadow; - button(background, foreground, disabled, shadow_color, 1, status) + styled(background, foreground, disabled, shadow_color, 1, status) } pub fn filled(theme: &Theme, status: Status) -> Style { @@ -87,7 +87,7 @@ pub fn filled(theme: &Theme, status: Status) -> Style { let shadow_color = theme.colors().shadow; - button(background, foreground, disabled, shadow_color, 0, status) + styled(background, foreground, disabled, shadow_color, 0, status) } pub fn filled_tonal(theme: &Theme, status: Status) -> Style { @@ -98,7 +98,7 @@ pub fn filled_tonal(theme: &Theme, status: Status) -> Style { let disabled = theme.colors().surface.on_surface; let shadow_color = theme.colors().shadow; - button(background, foreground, disabled, shadow_color, 0, status) + styled(background, foreground, disabled, shadow_color, 0, status) } pub fn outlined(theme: &Theme, status: Status) -> Style { @@ -121,7 +121,7 @@ pub fn outlined(theme: &Theme, status: Status) -> Style { }, }; - let style = button( + let style = styled( background, foreground, disabled, @@ -138,7 +138,7 @@ pub fn text(theme: &Theme, status: Status) -> Style { let background = Color::TRANSPARENT; let disabled = theme.colors().surface.on_surface; - let style = button( + let style = styled( background, foreground, disabled, |
