diff options
author | kobewi <kobewi4e@gmail.com> | 2022-06-21 01:19:54 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-07-04 15:02:15 +0200 |
commit | 41f6e7c50ef8fc0e1e889745ba51a7c094d09d22 (patch) | |
tree | 8c63308f0d065d82faa29184c380775052ebb41e /scene/gui/text_edit.h | |
parent | b4644e283556b499a22dada2db5cff12290440ca (diff) | |
download | redot-engine-41f6e7c50ef8fc0e1e889745ba51a7c094d09d22.tar.gz |
Allow to disable TextEdit vertical scroll
Diffstat (limited to 'scene/gui/text_edit.h')
-rw-r--r-- | scene/gui/text_edit.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 9de2982d0a..6ba6e9cf20 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -456,6 +456,8 @@ private: HScrollBar *h_scroll = nullptr; VScrollBar *v_scroll = nullptr; + float content_height_cache = 0.0; + bool fit_content_height = false; bool scroll_past_end_of_file_enabled = false; // Smooth scrolling. @@ -851,6 +853,9 @@ public: void set_v_scroll_speed(float p_speed); float get_v_scroll_speed() const; + void set_fit_content_height_enabled(const bool p_enabled); + bool is_fit_content_height_enabled() const; + double get_scroll_pos_for_line(int p_line, int p_wrap_index = 0) const; // Visible lines. |