-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetItemDefaultFocus scroll improvement suggestions #2812
Comments
Hello, Could you provide concrete example/screenshots of both of your case? If |
Case 1Popup window does not visibly select 1280x720 button because 1px is already visible (the black line at bottom under 1024x768) when calling Case 2Only centering the view on the item when it is not visible is weird especially combined with suggested fix of case 1. Assume that the focused item is just barely fully visible then it would be at the very bottom (or top). But if the focused item is just the one below that then it results in it being completely centered which is a jump in behaviour. I just tested default comboboxes on Windows and they actually simply try to scroll so that the item is at the top or as much as possible at the top. So in |
Case 1: Totally agreeing. Case 2: I don't think your answer refers to the same idea that I suggested? I suggested using the "IsWindowAppearing" test. Typically behave different on the frame a window is appearing vs if function is called while the window is already up. This is unrelated to the visibility of items within a given window. Scrolling to the center or to the top is another decision to do. I agree that the behavior of |
…ed (fix nav in one axis scrolling back and forth between axises when space is tight by just < ItemSpacing*2) (ocornut#3692, ocornut#2812, ocornut#4242, ocornut#2900) Amend 8f495e5
Closing as per #2814, both cases should be solved. Thanks for your patience! |
…tered element that is not visible but could be would take the item's Y coordinate into account. Neither behavior were used in the codebase for this axis. Amend 27c58c3 (ocornut#5902, ocornut#2812, ocornut#4242, ocornut#2900) Signed-off-by: Neil Bickford <[email protected]>
Hey, I think SetItemDefaultFocus scrolling could be improved due to the following minor issues:
I think the best behavior would be to copy what the .NET ListView
EnsureVisible
method does: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.listview.ensurevisible?view=netframework-4.8Dear ImGui 1.73
The text was updated successfully, but these errors were encountered: