aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-04-15 01:34:09 +0200
committerpml68 <contact@pml68.dev>2025-04-15 01:34:09 +0200
commite7e5b05ca8c11c2ba329d0b6daffe9a218aee9a1 (patch)
tree2d86d51c1d9ab46258f7f626ace6645c19582bf8 /src/lib.rs
parentfix: example package name (diff)
downloadiced_dialog-e7e5b05ca8c11c2ba329d0b6daffe9a218aee9a1.tar.gz
refactor!: move backdrop_color into `Style` struct
Diffstat (limited to '')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 856a45c..718f1ce 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,6 +30,7 @@ where
/// [`Button`]: https://docs.iced.rs/iced/widget/struct.Button.html
pub fn button<'a, Message, Theme, Renderer>(
content: &'a str,
+ message: Message,
) -> Button<'a, Message, Theme, Renderer>
where
Theme: 'a + iced_widget::button::Catalog + text::Catalog,
@@ -41,6 +42,7 @@ where
.line_height(text::LineHeight::Absolute(core::Pixels(20.0)))
.align_x(Horizontal::Center),
)
+ .on_press(message)
.height(32)
.width(core::Length::Fill)
}