Make tab's close button responsive to touch taps

This commit is contained in:
Fredia Huya-Kouadio 2023-04-04 18:05:01 -07:00 committed by Relintai
parent d54b5ad8f8
commit 0947677049

View File

@ -191,12 +191,14 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
for (int i = offset; i <= max_drawn_tab; i++) {
if (tabs[i].rb_rect.has_point(pos)) {
rb_pressing = true;
_update_hover();
update();
return;
}
if (tabs[i].cb_rect.has_point(pos) && (cb_displaypolicy == CLOSE_BUTTON_SHOW_ALWAYS || (cb_displaypolicy == CLOSE_BUTTON_SHOW_ACTIVE_ONLY && i == current))) {
cb_pressing = true;
_update_hover();
update();
return;
}