mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
Fixed Y scroll aiming when Horizontal Scrollbar is enabled (#665). Tweak log demo.
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user