summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuyakou@gmail.com>2023-04-05 10:00:23 -0700
committerYuri Sizov <yuris@humnom.net>2023-04-26 14:32:21 +0200
commit01014a74753ed08f42ab81bebc65473bcd254312 (patch)
tree06eb4cfdb9a58b355d4ce3bd8239172fe10a2f0c /scene
parentbceb910f3a2c1cf864f0a6a675c995e4bf87252e (diff)
Make tab's close button responsive to touch taps
(cherry picked from commit 7325ffdd464c4efe6b7c118c0e6dae2b0ae501fa)
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tab_bar.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp
index 5e378a0321..394e9052c9 100644
--- a/scene/gui/tab_bar.cpp
+++ b/scene/gui/tab_bar.cpp
@@ -255,12 +255,14 @@ void TabBar::gui_input(const Ref<InputEvent> &p_event) {
if (tabs[i].rb_rect.has_point(pos)) {
rb_pressing = true;
+ _update_hover();
queue_redraw();
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();
queue_redraw();
return;
}