Set an appropriate minimum size for labels in windows that display incorrectly

When the label's `autowrap_mode` is `AUTOWRAP_WORD_SMART` and the initial `text`
is set at the same time, it may have a higher height.

Set an appropriate minimum size for labels in windows that display incorrectly
so that these controls display properly.
This commit is contained in:
风青山
2023-12-14 10:41:22 +08:00
parent 26b1fd0d84
commit f932c6548e
2 changed files with 5 additions and 0 deletions

View File

@@ -1277,6 +1277,7 @@ ProjectExportDialog::ProjectExportDialog() {
server_strip_message = memnew(Label);
server_strip_message->set_visible(false);
server_strip_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
server_strip_message->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
resources_vb->add_child(server_strip_message);
{