Fixed scrollbar enable/disable calculation when size is modified programmatically. This is the generalization of the fix in 2df8fa95df.

This commit is contained in:
omar
2017-12-06 15:13:23 +01:00
parent ecacaf7f2d
commit beda5fc5a0
2 changed files with 11 additions and 11 deletions

View File

@ -701,6 +701,7 @@ struct IMGUI_API ImGuiWindow
ImVec2 Pos; // Position rounded-up to nearest pixel
ImVec2 Size; // Current size (==SizeFull or collapsed title bar size)
ImVec2 SizeFull; // Size when non collapsed
ImVec2 SizeFullAtLastBegin; // Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame
ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize()
ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis