1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Scrollbar: stabilize visibility of ScrollbarX when detecting a feedback loop. (#8488, #3285, #4539)

This commit is contained in:
ocornut 2025-03-12 14:15:51 +01:00
parent 6e30c42101
commit d9dad2f4a1
3 changed files with 28 additions and 3 deletions

View file

@ -82,6 +82,14 @@ Other changes:
visibility of the preview/hint buffer. (#8368) [@m9710797, @ocornut]
- Scrollbar: Rework logic that fades-out scrollbar when it becomes too small,
which amusingly made it disappear when using very big font/frame size.
- Scrollbar: Automatically stabilize ScrollbarX visibility when detecting a
feedback loop manifesting with ScrollbarX visibility toggling on and off
repeatedly. (#8488, #3285, #4539)
(feedback loops of this sort can manifest in various situations, but combining
horizontal + vertical scrollbar + using a clipper with varying width items is
one frequent cause. The better solution is to, either: (1) enforce visibility
by using ImGuiWindowFlags_AlwaysHorizontalScrollbar or (2) declare stable
contents width with SetNextWindowContentSize(), if you can compute it.)
- Tables: fixed calling SetNextWindowScroll() on clipped scrolling table
to not leak the value into a subsequent window. (#8196)
- Tables: fixed an issue where Columns Visible/Width state wouldn't be correctly