mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Tabs: (Breaking) renamed ImGuiTabBarFlags_FittingPolicyResizeDown to ImGuiTabBarFlags_FittingPolicyShrink. (#261, #351)
Amend 54a60aaa40
This commit is contained in:
parent
7278cda039
commit
78d11cd781
5 changed files with 29 additions and 18 deletions
|
|
@ -9691,7 +9691,7 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
|
|||
width_excess = (section_0_w + section_2_w) - tab_bar->BarRect.GetWidth(); // Excess used to shrink leading/trailing section
|
||||
|
||||
// With ImGuiTabBarFlags_FittingPolicyScroll policy, we will only shrink leading/trailing if the central section is not visible anymore
|
||||
if (width_excess >= 1.0f && ((tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyResizeDown) || !central_section_is_visible))
|
||||
if (width_excess >= 1.0f && ((tab_bar->Flags & ImGuiTabBarFlags_FittingPolicyShrink) || !central_section_is_visible))
|
||||
{
|
||||
int shrink_data_count = (central_section_is_visible ? sections[1].TabCount : sections[0].TabCount + sections[2].TabCount);
|
||||
int shrink_data_offset = (central_section_is_visible ? sections[0].TabCount + sections[2].TabCount : 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue