瀏覽代碼

Vertical alignement (TabContainer menu button)

toger5 8 年之前
父節點
當前提交
814c50106b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scene/gui/tab_container.cpp

+ 2 - 2
scene/gui/tab_container.cpp

@@ -264,9 +264,9 @@ void TabContainer::_notification(int p_what) {
 			if (popup) {
 				x -= menu->get_width();
 				if (mouse_x_cache > x)
-					menu_hl->draw(get_canvas_item(), Size2(x, 0));
+					menu_hl->draw(get_canvas_item(), Size2(x, (header_height - menu_hl->get_height()) / 2));
 				else
-					menu->draw(get_canvas_item(), Size2(x, 0));
+					menu->draw(get_canvas_item(), Size2(x, (header_height - menu->get_height()) / 2));
 			}
 
 			// Draw the navigation buttons.