From 66d5a66a14c0e5e9ebd18d2988f1bac3b9b6bc61 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 22 Oct 2025 12:01:00 -0300 Subject: [PATCH] Show the arrow cursor on disabled `LinkButton`s --- scene/gui/link_button.cpp | 4 ++++ scene/gui/link_button.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index 1af8117d80b..65fcc97d451 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -151,6 +151,10 @@ Size2 LinkButton::get_minimum_size() const { return text_buf->get_size(); } +Control::CursorShape LinkButton::get_cursor_shape(const Point2 &p_pos) const { + return is_disabled() ? CURSOR_ARROW : get_default_cursor_shape(); +} + void LinkButton::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ACCESSIBILITY_UPDATE: { diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h index 4847bad9c45..d1550f013ff 100644 --- a/scene/gui/link_button.h +++ b/scene/gui/link_button.h @@ -105,6 +105,8 @@ public: Ref get_button_font() const; + virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override; + LinkButton(const String &p_text = String()); };