summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-07 15:21:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-07 15:21:42 +0100
commit44f002f64a9d53040f09affe69bd92675e302e16 (patch)
treeae7df604a8926a431b63c8ad27910de3ec54342d /examples
parent4489af7bfdae32f8bec7c9b2aeaf1b406db696ea (diff)
downloadiced-44f002f64a9d53040f09affe69bd92675e302e16.tar.gz
iced-44f002f64a9d53040f09affe69bd92675e302e16.tar.bz2
iced-44f002f64a9d53040f09affe69bd92675e302e16.zip
Rename `positive` and `destructive` to `success` and `danger` in `button`
Diffstat (limited to 'examples')
-rw-r--r--examples/game_of_life/src/main.rs2
-rw-r--r--examples/lazy/src/main.rs2
-rw-r--r--examples/pane_grid/src/main.rs4
-rw-r--r--examples/screenshot/src/main.rs2
-rw-r--r--examples/stopwatch/src/main.rs2
-rw-r--r--examples/todos/src/main.rs2
6 files changed, 7 insertions, 7 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs
index b362381c..0507a1ca 100644
--- a/examples/game_of_life/src/main.rs
+++ b/examples/game_of_life/src/main.rs
@@ -195,7 +195,7 @@ fn view_controls<'a>(
.text_size(16),
button("Clear")
.on_press(Message::Clear)
- .style(button::destructive),
+ .style(button::danger),
]
.padding(10)
.spacing(20)
diff --git a/examples/lazy/src/main.rs b/examples/lazy/src/main.rs
index 1c5f59d5..8758fa66 100644
--- a/examples/lazy/src/main.rs
+++ b/examples/lazy/src/main.rs
@@ -180,7 +180,7 @@ impl Sandbox for App {
column(items.into_iter().map(|item| {
let button = button("Delete")
.on_press(Message::DeleteItem(item.clone()))
- .style(button::destructive);
+ .style(button::danger);
row![
text(&item.name).color(item.color),
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs
index eb904c3f..5e728ce1 100644
--- a/examples/pane_grid/src/main.rs
+++ b/examples/pane_grid/src/main.rs
@@ -287,7 +287,7 @@ fn view_content<'a>(
)
]
.push_maybe(if total_panes > 1 && !is_pinned {
- Some(button("Close", Message::Close(pane)).style(button::destructive))
+ Some(button("Close", Message::Close(pane)).style(button::danger))
} else {
None
})
@@ -333,7 +333,7 @@ fn view_controls<'a>(
});
let close = button(text("Close").size(14))
- .style(button::destructive)
+ .style(button::danger)
.padding(3)
.on_press_maybe(if total_panes > 1 && !is_pinned {
Some(Message::Close(pane))
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs
index c670b20b..10a6aea3 100644
--- a/examples/screenshot/src/main.rs
+++ b/examples/screenshot/src/main.rs
@@ -226,7 +226,7 @@ impl Application for Example {
crop_controls,
button(centered_text("Crop"))
.on_press(Message::Crop)
- .style(button::destructive)
+ .style(button::danger)
.padding([10, 20, 10, 20])
.width(Length::Fill),
]
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs
index 7a097e90..56b7686e 100644
--- a/examples/stopwatch/src/main.rs
+++ b/examples/stopwatch/src/main.rs
@@ -136,7 +136,7 @@ impl Application for Stopwatch {
};
let reset_button = button("Reset")
- .style(button::destructive)
+ .style(button::danger)
.on_press(Message::Reset);
let controls = row![toggle_button, reset_button].spacing(20);
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs
index 800d2fe0..aaa86ef8 100644
--- a/examples/todos/src/main.rs
+++ b/examples/todos/src/main.rs
@@ -386,7 +386,7 @@ impl Task {
)
.on_press(TaskMessage::Delete)
.padding(10)
- .style(button::destructive)
+ .style(button::danger)
]
.spacing(20)
.align_items(Alignment::Center)