aboutsummaryrefslogtreecommitdiff
path: root/examples/styling.rs
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2025-11-22 08:30:00 +0100
committerPolesznyák Márk <contact@pml68.dev>2025-11-22 08:30:00 +0100
commitff7e17988d5868c72cfb39d09ccf4efb05d3ceda (patch)
tree0734e0f409028e203532bfaea2c7372e2c646078 /examples/styling.rs
parentchore: add mailmap (diff)
downloadiced_material-ff7e17988d5868c72cfb39d09ccf4efb05d3ceda.tar.gz
feat!: combine `Primary`, `Secondary`, `Tertiary` and `Error`
Now only a singular `ColorQuartet` struct exists. Also rename some `Surface` and `Inverse` fields for consistency.
Diffstat (limited to '')
-rw-r--r--examples/styling.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/styling.rs b/examples/styling.rs
index cff0b77..4ed643e 100644
--- a/examples/styling.rs
+++ b/examples/styling.rs
@@ -51,7 +51,7 @@ impl Styling {
toggler_value: false,
}
}
-
+
fn update(&mut self, message: Message) {
match message {
Message::ThemeChanged(theme) => {
@@ -98,7 +98,7 @@ impl Styling {
.padding([5, 10])
.width(Fill)
.style(|theme: &Theme| {
- let color = theme.colors().surface.on_surface;
+ let color = theme.colors().surface.text;
container::Style {
background: Some(
disabled_container(color).into(),
@@ -178,8 +178,7 @@ impl Styling {
.style(|theme| {
let style =
iced_material::container::surface_container_lowest(theme);
- let border_color =
- theme.colors().surface.surface_container.high;
+ let border_color = theme.colors().surface.container.high;
container::Style {
border: style.border.color(border_color).width(1),