diff options
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 07c0945114..c33340ce69 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1087,6 +1087,7 @@ void CodeTextEditor::update_editor_settings() { text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed")); text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_breakpoint_gutter")); text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret")); + text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/open_scripts/smooth_scrolling")); } void CodeTextEditor::set_error(const String &p_error) { @@ -1222,10 +1223,11 @@ CodeTextEditor::CodeTextEditor() { error = memnew(Label); status_bar->add_child(error); error->hide(); + error->set_clip_text(true); //do not change, or else very long errors can push the whole container to the right error->set_valign(Label::VALIGN_CENTER); error->add_color_override("font_color", Color(1, 0.7, 0.6, 0.9)); - - status_bar->add_spacer(); + error->set_h_size_flags(SIZE_EXPAND_FILL); //required for it to display, given now it's clipping contents, do not touch + //status_bar->add_spacer(); Label *line_txt = memnew(Label); status_bar->add_child(line_txt); @@ -1238,7 +1240,8 @@ CodeTextEditor::CodeTextEditor() { status_bar->add_child(line_nb); line_nb->set_valign(Label::VALIGN_CENTER); line_nb->set_v_size_flags(SIZE_FILL); - line_nb->set_autowrap(true); // workaround to prevent resizing the label on each change + line_nb->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch + line_nb->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch line_nb->set_custom_minimum_size(Size2(40, 1) * EDSCALE); Label *col_txt = memnew(Label); @@ -1252,7 +1255,8 @@ CodeTextEditor::CodeTextEditor() { status_bar->add_child(col_nb); col_nb->set_valign(Label::VALIGN_CENTER); col_nb->set_v_size_flags(SIZE_FILL); - col_nb->set_autowrap(true); // workaround to prevent resizing the label on each change + col_nb->set_autowrap(true); // workaround to prevent resizing the label on each change, do not touch + col_nb->set_clip_text(true); // workaround to prevent resizing the label on each change, do not touch col_nb->set_custom_minimum_size(Size2(40, 1) * EDSCALE); text_editor->connect("gui_input", this, "_text_editor_gui_input"); |