浏览代码

Make tab's close button responsive to touch taps

Fredia Huya-Kouadio 2 年之前
父节点
当前提交
7325ffdd46
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scene/gui/tab_bar.cpp

+ 2 - 0
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;
 				}