Tabs: when scrolling is enabled, track selected tabs when resizing down parent container. (#3421, #8800)

This commit is contained in:
ocornut
2025-07-31 23:39:44 +09:00
parent 3ef6c8410a
commit 320c94bfaa
3 changed files with 10 additions and 0 deletions

View File

@@ -2758,6 +2758,7 @@ struct IMGUI_API ImGuiTabBar
int CurrFrameVisible;
int PrevFrameVisible;
ImRect BarRect;
float BarRectPrevWidth; // Backup of previous width. When width change we enforce keep horizontal scroll on focused tab.
float CurrTabsContentsHeight;
float PrevTabsContentsHeight; // Record the height of contents submitted below the tab bar
float WidthAllTabs; // Actual width of all tabs (locked during layout)