mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Scrollbar: Avoid rendering when sizes are negative to reduce glitches (not sure how this ever slipped through - perhaps because of WindowMinSize settings).
This commit is contained in:
parent
df52f46b13
commit
bd9868f447
@ -4474,6 +4474,8 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal)
|
||||
: ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + border_size, window_rect.Max.x - border_size, window_rect.Max.y - other_scrollbar_size_w - border_size);
|
||||
if (!horizontal)
|
||||
bb.Min.y += window->TitleBarHeight() + ((window->Flags & ImGuiWindowFlags_MenuBar) ? window->MenuBarHeight() : 0.0f);
|
||||
if (bb.GetWidth() <= 0.0f || bb.GetHeight() <= 0.0f)
|
||||
return;
|
||||
|
||||
float window_rounding = (window->Flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding;
|
||||
int window_rounding_corners;
|
||||
|
Loading…
Reference in New Issue
Block a user