fix(core): set dialog title via API, closes #4029 (#4030)

This commit is contained in:
Lucas Fernandes Nogueira
2022-05-02 17:04:45 -07:00
committed by GitHub
parent d31167c520
commit 220e746014
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Fixes the `title` option being ignored in the dialog API endpoints.

View File

@@ -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);
}
@@ -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);
}