diff options
| author | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-07-04 16:43:55 +0200 |
|---|---|---|
| committer | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-07-04 16:43:55 +0200 |
| commit | 56a8d3f30c09fdc03b19ef48a97d344ffe2df974 (patch) | |
| tree | f3be955afcbb70de9d3afcd8a462ff7cecc980ce /editor/plugins/visual_shader_editor_plugin.cpp | |
| parent | cb4e42155dd3a0e513106d7a219366dd355e9483 (diff) | |
| download | redot-engine-56a8d3f30c09fdc03b19ef48a97d344ffe2df974.tar.gz | |
Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 1183da4d04..bf6cff6d8b 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3855,7 +3855,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 @@ -3941,7 +3941,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); |
