Merge pull request #97004 from Giganzo/file_dialog_size

Fix FileDialog default size
This commit is contained in:
Rémi Verschelde 2024-09-18 17:41:03 +02:00
commit a80e57c663
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,7 @@
If [code]true[/code], the dialog will show hidden files.
[b]Note:[/b] This property is ignored by native file dialogs on Linux.
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(640, 360)" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
<member name="use_native_dialog" type="bool" setter="set_use_native_dialog" getter="get_use_native_dialog" default="false">
If [code]true[/code], [member access] is set to [constant ACCESS_FILESYSTEM], and it is supported by the current [DisplayServer], OS native dialog will be used instead of custom one.

View File

@ -1526,6 +1526,7 @@ FileDialog::FileDialog() {
update_dir();
set_hide_on_ok(false);
set_size(Size2(640, 360));
if (register_func) {
register_func(this);