mirror of
https://github.com/Drezil/imgui.git
synced 2025-09-18 09:03:13 +02:00
Scrolling: internal scrolling value is rounded instead of truncated. (#6677)
This commit is contained in:
@ -10122,7 +10122,7 @@ static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window)
|
||||
}
|
||||
scroll[axis] = scroll_target - center_ratio * (window->SizeFull[axis] - decoration_size[axis]);
|
||||
}
|
||||
scroll[axis] = IM_TRUNC(ImMax(scroll[axis], 0.0f));
|
||||
scroll[axis] = IM_ROUND(ImMax(scroll[axis], 0.0f));
|
||||
if (!window->Collapsed && !window->SkipItems)
|
||||
scroll[axis] = ImMin(scroll[axis], window->ScrollMax[axis]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user