mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
TabBar: feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (#2768)
Before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations. Amend f95c77eeea
.
This commit is contained in:
@ -4286,7 +4286,6 @@ static void ShowExampleAppWindowTitles(bool*)
|
||||
// Demonstrate using the low-level ImDrawList to draw custom shapes.
|
||||
static void ShowExampleAppCustomRendering(bool* p_open)
|
||||
{
|
||||
ImGui::SetNextWindowSize(ImVec2(350, 560), ImGuiCond_FirstUseEver);
|
||||
if (!ImGui::Begin("Example: Custom rendering", p_open))
|
||||
{
|
||||
ImGui::End();
|
||||
@ -4406,7 +4405,9 @@ static void ShowExampleAppCustomRendering(bool* p_open)
|
||||
static bool draw_bg = true;
|
||||
static bool draw_fg = true;
|
||||
ImGui::Checkbox("Draw in Background draw list", &draw_bg);
|
||||
ImGui::SameLine(); HelpMarker("The Background draw list will be rendered below every Dear ImGui windows.");
|
||||
ImGui::Checkbox("Draw in Foreground draw list", &draw_fg);
|
||||
ImGui::SameLine(); HelpMarker("The Foreground draw list will be rendered over every Dear ImGui windows.");
|
||||
ImVec2 window_pos = ImGui::GetWindowPos();
|
||||
ImVec2 window_size = ImGui::GetWindowSize();
|
||||
ImVec2 window_center = ImVec2(window_pos.x + window_size.x * 0.5f, window_pos.y + window_size.y * 0.5f);
|
||||
|
Reference in New Issue
Block a user