Merge pull request #111926 from YeldhamDev/stop_pointing_fingers

Show the arrow cursor on disabled `LinkButton`s
This commit is contained in:
Thaddeus Crews 2025-11-25 12:55:10 -06:00
commit 6774821a23
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 6 additions and 0 deletions

View file

@ -199,6 +199,10 @@ Size2 LinkButton::get_minimum_size() const {
return minsize;
}
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: {

View file

@ -114,6 +114,8 @@ public:
Ref<Font> get_button_font() const;
int get_button_font_size() const;
virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override;
LinkButton(const String &p_text = String());
};