From 6737037743d39a559ccaac17afe9a46333990f42 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 20 Jan 2021 19:35:10 +0100 Subject: [PATCH] Tab Bar: fix 0ea4408 (#3414) --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 69cd4dcf..46394d48 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -7253,7 +7253,7 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar) // Actual layout in host window (we don't do it in BeginTabBar() so as not to waste an extra frame) ImGuiWindow* window = g.CurrentWindow; window->DC.CursorPos = tab_bar->BarRect.Min; - ItemSize(tab_bar->BarRect.GetSize(), tab_bar->FramePadding.y); + ItemSize(ImVec2(tab_bar->WidthAllTabs, tab_bar->BarRect.GetHeight()), tab_bar->FramePadding.y); window->DC.IdealMaxPos.x = ImMax(window->DC.IdealMaxPos.x, tab_bar->BarRect.Min.x + tab_bar->WidthAllTabsIdeal); }