mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
Fixed Y scroll aiming when Horizontal Scrollbar is enabled (#665). Tweak log demo.
This commit is contained in:
parent
7096fd8500
commit
e36b41cbd0
2 changed files with 3 additions and 3 deletions
|
|
@ -4200,7 +4200,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||
if (window->ScrollTarget.y < FLT_MAX)
|
||||
{
|
||||
float center_ratio = window->ScrollTargetCenterRatio.y;
|
||||
window->Scroll.y = window->ScrollTarget.y - ((1.0f - center_ratio) * (window->TitleBarHeight() + window->MenuBarHeight())) - (center_ratio * window->SizeFull.y);
|
||||
window->Scroll.y = window->ScrollTarget.y - ((1.0f - center_ratio) * (window->TitleBarHeight() + window->MenuBarHeight())) - (center_ratio * (window->SizeFull.y - window->ScrollbarSizes.y));
|
||||
window->ScrollTarget.y = FLT_MAX;
|
||||
}
|
||||
window->Scroll = ImMax(window->Scroll, ImVec2(0.0f, 0.0f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue