summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/link_button.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index e6c3ca3b5f..b579791990 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -243,11 +243,12 @@ void LinkButton::_notification(int p_what) {
if (do_underline) {
int underline_spacing = theme_cache.underline_spacing + text_buf->get_line_underline_position();
int y = text_buf->get_line_ascent() + underline_spacing;
+ int underline_thickness = MAX(1, text_buf->get_line_underline_thickness());
if (is_layout_rtl()) {
- draw_line(Vector2(size.width - width, y), Vector2(size.width, y), color, text_buf->get_line_underline_thickness());
+ draw_line(Vector2(size.width - width, y), Vector2(size.width, y), color, underline_thickness);
} else {
- draw_line(Vector2(0, y), Vector2(width, y), color, text_buf->get_line_underline_thickness());
+ draw_line(Vector2(0, y), Vector2(width, y), color, underline_thickness);
}
}
} break;