summaryrefslogtreecommitdiff
path: root/iced_builder/src/dialogs.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2024-12-30 02:15:10 +0100
committerpml68 <contact@pml68.dev>2024-12-30 02:15:10 +0100
commit0dad6dd5b8395d3089bed022a4b8830f7cae7d9f (patch)
treee28ccc225c07f9b49a1c233fb81c8eddd75a01c0 /iced_builder/src/dialogs.rs
parentrefactor!: switch to `uuid` for uuid generation (diff)
downloadiced-builder-0dad6dd5b8395d3089bed022a4b8830f7cae7d9f.tar.gz
feat: add config loading, with theming support, limited to Palette for now
Diffstat (limited to '')
-rw-r--r--iced_builder/src/dialogs.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/iced_builder/src/dialogs.rs b/iced_builder/src/dialogs.rs
index 047ffd2..c9a5ba2 100644
--- a/iced_builder/src/dialogs.rs
+++ b/iced_builder/src/dialogs.rs
@@ -9,6 +9,15 @@ pub fn error_dialog(description: impl Into<String>) {
.show();
}
+pub fn warning_dialog(description: impl Into<String>) {
+ let _ = MessageDialog::new()
+ .set_level(MessageLevel::Warning)
+ .set_buttons(MessageButtons::Ok)
+ .set_title("Heads up!")
+ .set_description(description)
+ .show();
+}
+
pub fn unsaved_changes_dialog(
description: impl Into<String>,
) -> MessageDialogResult {