diff options
author | Menderes <mehmet41650@gmail.com> | 2021-08-21 00:57:51 +0300 |
---|---|---|
committer | requizm <mehmet41650@gmail.com> | 2021-08-21 00:59:44 +0300 |
commit | 31face36e7c2322ee37ce3d218f56066da7b355a (patch) | |
tree | d381850f2560e870c740f79e34867dcd17fce6bb | |
parent | 2daef0400a95bb467dacff845052a27e464e4dec (diff) |
Fix line_separation working incorrectly in find_click of RichTextLabel
Apply suggestions from code review
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
-rw-r--r-- | scene/gui/rich_text_label.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 32fa7cc045..75c2da7ef9 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1127,7 +1127,7 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs); while (ofs.y < size.height && from_line < main->lines.size()) { _find_click_in_line(p_frame, from_line, ofs, text_rect.size.x, p_click, r_click_frame, r_click_line, r_click_item, r_click_char); - ofs.y += main->lines[from_line].text_buf->get_size().y; + ofs.y += main->lines[from_line].text_buf->get_size().y + get_theme_constant(SNAME("line_separation")); if (((r_click_item != nullptr) && ((*r_click_item) != nullptr)) || ((r_click_frame != nullptr) && ((*r_click_frame) != nullptr))) { if (r_outside != nullptr) { *r_outside = false; |