|
@@ -6447,6 +6447,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
window->DC.MenuBarOffset.x = ImMax(ImMax(window->WindowPadding.x, style.ItemSpacing.x), g.NextWindowData.MenuBarOffsetMinVal.x);
|
|
|
window->DC.MenuBarOffset.y = g.NextWindowData.MenuBarOffsetMinVal.y;
|
|
|
|
|
|
+ bool use_current_size_for_scrollbar_x = window_just_created;
|
|
|
+ bool use_current_size_for_scrollbar_y = window_just_created;
|
|
|
+
|
|
|
// Collapse window by double-clicking on title bar
|
|
|
// At this point we don't have a clipping rectangle setup yet, so we can use the title bar area for hit detection and drawing
|
|
|
if (!(flags & ImGuiWindowFlags_NoTitleBar) && !(flags & ImGuiWindowFlags_NoCollapse))
|
|
@@ -6458,6 +6461,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
if (window->WantCollapseToggle)
|
|
|
{
|
|
|
window->Collapsed = !window->Collapsed;
|
|
|
+ if (!window->Collapsed)
|
|
|
+ use_current_size_for_scrollbar_y = true;
|
|
|
MarkIniSettingsDirty(window);
|
|
|
}
|
|
|
}
|
|
@@ -6471,8 +6476,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
|
// Calculate auto-fit size, handle automatic resize
|
|
|
const ImVec2 size_auto_fit = CalcWindowAutoFitSize(window, window->ContentSizeIdeal);
|
|
|
- bool use_current_size_for_scrollbar_x = window_just_created;
|
|
|
- bool use_current_size_for_scrollbar_y = window_just_created;
|
|
|
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) && !window->Collapsed)
|
|
|
{
|
|
|
// Using SetNextWindowSize() overrides ImGuiWindowFlags_AlwaysAutoResize, so it can be used on tooltips/popups, etc.
|