mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Clarified behavior of SetNextWindowContentSize(). Content size is defined as the size available after removal of WindowPadding on each sides. So SetNextWindowContentSize(ImVec2(100,100)) + auto-resize will always allow submitting a 100x100 item without creating a scrollbar, regarding of WindowPadding.The exact meaning of ContentSize for decorated windows was previously ill-defined.
This commit is contained in:
@ -1253,9 +1253,8 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 Pos; // Position (always 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. FIXME: Include decoration, window title, border, menu, etc. Ideally should remove them from this value?
|
||||
ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize(). EXCLUDE decorations. Making this not consistent with the above!
|
||||
ImVec2 SizeContents; // Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous frame. Does not include window decoration or window padding.
|
||||
ImVec2 SizeContentsExplicit; // Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize().
|
||||
ImVec2 WindowPadding; // Window padding at the time of begin.
|
||||
float WindowRounding; // Window rounding at the time of begin.
|
||||
float WindowBorderSize; // Window border size at the time of begin.
|
||||
|
Reference in New Issue
Block a user