Fixed RichTextLabel + ui_down scrolling too far

This commit is contained in:
KernRat 2024-07-06 16:58:33 +02:00
parent b97110cd30
commit 3f4222bad4
No known key found for this signature in database
GPG key ID: 4D34E5DFED3241D5

View file

@ -2098,7 +2098,7 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) {
handled = true; handled = true;
} }
if (k->is_action("ui_down", true) && vscroll->is_visible_in_tree()) { if (k->is_action("ui_down", true) && vscroll->is_visible_in_tree()) {
vscroll->scroll(vscroll->get_value() + theme_cache.normal_font->get_height(theme_cache.normal_font_size)); vscroll->scroll(theme_cache.normal_font->get_height(theme_cache.normal_font_size));
handled = true; handled = true;
} }
if (k->is_action("ui_home", true) && vscroll->is_visible_in_tree()) { if (k->is_action("ui_home", true) && vscroll->is_visible_in_tree()) {