mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Scrolling: Fix scroll tracking with e.g. SetScrollHereX/Y() when WindowPadding < ItemSpacing. Fix scroll snapping on edge of scroll region when both scrollbars are enabled.
CalcNextScrollFromScrollTargetAndClamp() fixed snapping edge calculation missing ScrollbarSizes.y
This commit is contained in:
@ -2838,6 +2838,8 @@ static void ShowDemoWindowLayout()
|
||||
{
|
||||
for (int item = 0; item < 100; item++)
|
||||
{
|
||||
if (item > 0)
|
||||
ImGui::SameLine();
|
||||
if (enable_track && item == track_item)
|
||||
{
|
||||
ImGui::TextColored(ImVec4(1, 1, 0, 1), "Item %d", item);
|
||||
@ -2847,7 +2849,6 @@ static void ShowDemoWindowLayout()
|
||||
{
|
||||
ImGui::Text("Item %d", item);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
float scroll_x = ImGui::GetScrollX();
|
||||
|
Reference in New Issue
Block a user