Merge pull request #50086 from Geometror/label-improve-layout-options

Improvements to Label's layout options
This commit is contained in:
Rémi Verschelde 2021-07-13 13:10:42 +02:00 committed by GitHub
commit aab6dc301c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 564 additions and 43 deletions

View file

@ -3957,7 +3957,7 @@ VisualShaderEditor::VisualShaderEditor() {
error_label = memnew(Label);
error_panel->add_child(error_label);
error_label->set_autowrap(true);
error_label->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
///////////////////////////////////////
// POPUP MENU
@ -4043,7 +4043,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_child(members_dialog);
alert = memnew(AcceptDialog);
alert->get_label()->set_autowrap(true);
alert->get_label()->set_autowrap_mode(Label::AUTOWRAP_WORD);
alert->get_label()->set_align(Label::ALIGN_CENTER);
alert->get_label()->set_valign(Label::VALIGN_CENTER);
alert->get_label()->set_custom_minimum_size(Size2(400, 60) * EDSCALE);