Windows: Scrollbar visibility decision uses current size when both size and contents size are submitted by API. (#7252)
This commit is contained in:
parent
44c7dfca03
commit
0573513d6d
@ -41,6 +41,8 @@ HOW TO UPDATE?
|
||||
|
||||
Other changes:
|
||||
|
||||
- Windows: Scrollbar visibility decision uses current size when both size and contents
|
||||
size are submitted by API. (#7252)
|
||||
- Menus, Popups: Fixed an issue where sibling menu popups re-opening in successive
|
||||
frames would erroneously close the window. While it is technically a popup issue
|
||||
it would generally manifest when fast moving the mouse bottom to top in a sub-menu.
|
||||
|
@ -6610,8 +6610,14 @@ 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;
|
||||
|
||||
// Depending on condition we use previous or current window size to compare against contents size to decide if a scrollbar should be visible.
|
||||
// Those flags will be altered further down in the function depending on more conditions.
|
||||
bool use_current_size_for_scrollbar_x = window_just_created;
|
||||
bool use_current_size_for_scrollbar_y = window_just_created;
|
||||
if (window_size_x_set_by_api && window->ContentSizeExplicit.x != 0.0f)
|
||||
use_current_size_for_scrollbar_x = true;
|
||||
if (window_size_y_set_by_api && window->ContentSizeExplicit.y != 0.0f) // #7252
|
||||
use_current_size_for_scrollbar_y = true;
|
||||
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user