mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
Amend / fix regression from 6e8e2c0
This commit is contained in:
parent
ab6e48b833
commit
5ac94ad898
@ -135,6 +135,7 @@ Other Changes:
|
||||
bar boundaries (bug in 1.88). (#5652).
|
||||
- Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
|
||||
- Window: Fixed a potential crash when appending to a child window. (#5515, #3496, #4797) [@rokups]
|
||||
- Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
|
||||
- IO: Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456)
|
||||
- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
|
||||
can apply to mouse data as well. (#4921)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user