diff options
author | 2024-03-27 19:47:48 +0900 | |
---|---|---|
committer | 2024-03-27 19:47:48 +0900 | |
commit | 19afc66cadfc7ea230d4d749b0d7b0197e29cf93 (patch) | |
tree | d012dff84003f2d7d18a1e6bc4bdac62df73b322 /examples/toast/src | |
parent | 4334e63ba1dd88b367f3b7f2790b7869d11d12c0 (diff) | |
parent | 1df1cf82f4c9485533f2566c8490cfe188b4ae6a (diff) | |
download | iced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.tar.gz iced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.tar.bz2 iced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.zip |
Merge branch 'master' into viewer_content_fit
Diffstat (limited to 'examples/toast/src')
-rw-r--r-- | examples/toast/src/main.rs | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs index fdae1dc1..9968962c 100644 --- a/examples/toast/src/main.rs +++ b/examples/toast/src/main.rs @@ -651,45 +651,33 @@ mod toast { } } - fn styled(pair: theme::palette::Pair) -> container::Appearance { - container::Appearance { + fn styled(pair: theme::palette::Pair) -> container::Style { + container::Style { background: Some(pair.color.into()), text_color: pair.text.into(), ..Default::default() } } - fn primary( - theme: &Theme, - _status: container::Status, - ) -> container::Appearance { + fn primary(theme: &Theme) -> container::Style { let palette = theme.extended_palette(); styled(palette.primary.weak) } - fn secondary( - theme: &Theme, - _status: container::Status, - ) -> container::Appearance { + fn secondary(theme: &Theme) -> container::Style { let palette = theme.extended_palette(); styled(palette.secondary.weak) } - fn success( - theme: &Theme, - _status: container::Status, - ) -> container::Appearance { + fn success(theme: &Theme) -> container::Style { let palette = theme.extended_palette(); styled(palette.success.weak) } - fn danger( - theme: &Theme, - _status: container::Status, - ) -> container::Appearance { + fn danger(theme: &Theme) -> container::Style { let palette = theme.extended_palette(); styled(palette.danger.weak) |