Skip to content

Commit

Permalink
Fix RichTextLabel alignment for clickable regions
Browse files Browse the repository at this point in the history
Fixes godotengine#41006 (regression from godotengine#39164).

The original alignment fix was limited to PROCESS_DRAW mode, which
caused some discrepancies with PROCESS_POINTER mode.
Now only PROCESS_CACHE is excluded with a condition a few lines above.
  • Loading branch information
pouleyKetchoupp committed Sep 11, 2020
1 parent f19c400 commit b783fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
lh = line < l.height_caches.size() ? l.height_caches[line] : 1; \
line_ascent = line < l.ascent_caches.size() ? l.ascent_caches[line] : 1; \
line_descent = line < l.descent_caches.size() ? l.descent_caches[line] : 1; \
if ((p_mode == PROCESS_DRAW) && (align != ALIGN_FILL)) { \
if (align != ALIGN_FILL) { \
if (line < l.offset_caches.size()) { \
wofs = l.offset_caches[line]; \
} \
Expand Down

0 comments on commit b783fa1

Please sign in to comment.