1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #94003 from KernRat/scroll-fix

Fix RichTextLabel + `ui_down` scrolling too far
This commit is contained in:
Rémi Verschelde
2024-07-11 00:27:10 +02:00

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()) {