Skip to content

Commit

Permalink
Tab Bar: Requested ideal content size (for auto-fit) doesn't affect h…
Browse files Browse the repository at this point in the history
…orizontal scrolling. Followup to afa01d8. (#3414)

+ minor Table rename
  • Loading branch information
ocornut committed Jan 15, 2021
1 parent 6af92b0 commit 0ea4408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Other Changes:
- Tab Bar: Fixed using more than 128 tabs in a tab bar (scrolling policy recommended).
- Tab Bar: Do not display a tooltip if the name already fits over a given tab. (#3521)
- Tab Bar: Fixed minor/unlikely bug skipping over a button when scrolling left with arrows.
- Tab Bar: Requested ideal content size (for auto-fit) doesn't affect horizontal scrolling. (#3414)
- Drag and Drop: Fix losing drop source ActiveID (and often source tooltip) when opening a TreeNode()
or CollapsingHeader() while dragging. (#1738)
- Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging
Expand All @@ -90,7 +91,7 @@ Other Changes:
- InputText: Fixed updating cursor/selection position when a callback altered the buffer in a way
where the byte count is unchanged but the decoded character count changes. (#3587) [@gqw]
- InputText: Fixed swiching from single to multi-line while preserving same ID.
- Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034)
- Combo: Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034)
- Nav: Fixed IsItemFocused() from returning false when Nav highlight is hidden because mouse has moved.
It's essentially been always the case but it doesn't make much sense. Instead we will aim at exposing
feedback and control of keyboard/gamepad navigation highlight and mouse hover disable flag. (#787, #2048)
Expand Down
3 changes: 2 additions & 1 deletion imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7241,7 +7241,8 @@ 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(ImVec2(tab_bar->WidthAllTabsIdeal, tab_bar->BarRect.GetHeight()), tab_bar->FramePadding.y);
ItemSize(tab_bar->BarRect.GetSize(), tab_bar->FramePadding.y);
window->DC.IdealMaxPos.x = ImMax(window->DC.IdealMaxPos.x, tab_bar->BarRect.Min.x + tab_bar->WidthAllTabsIdeal);
}

// Dockables uses Name/ID in the global namespace. Non-dockable items use the ID stack.
Expand Down

0 comments on commit 0ea4408

Please sign in to comment.