Skip to content

Commit

Permalink
fix(core): set dialog title via API, closes #4029 (#4030)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 3, 2022
1 parent d31167c commit 220e746
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-dialog-title.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fixes the `title` option being ignored in the dialog API endpoints.
6 changes: 6 additions & 0 deletions core/tauri/src/endpoints/dialog.rs
Expand Up @@ -95,6 +95,9 @@ impl Cmd {
{
dialog_builder = dialog_builder.set_parent(&context.window);
}
if let Some(title) = options.title {
dialog_builder = dialog_builder.set_title(&title);
}
if let Some(default_path) = options.default_path {
dialog_builder = set_default_path(dialog_builder, default_path);
}
Expand Down Expand Up @@ -143,6 +146,9 @@ impl Cmd {
{
dialog_builder = dialog_builder.set_parent(&context.window);
}
if let Some(title) = options.title {
dialog_builder = dialog_builder.set_title(&title);
}
if let Some(default_path) = options.default_path {
dialog_builder = set_default_path(dialog_builder, default_path);
}
Expand Down

0 comments on commit 220e746

Please sign in to comment.