瀏覽代碼

Fixed RichTextLabel + ui_down scrolling too far

KernRat 1 年之前
父節點
當前提交
3f4222bad4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/rich_text_label.cpp

+ 1 - 1
scene/gui/rich_text_label.cpp

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