Skip to content
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

Focused selectable item is not centered within BeginCombo selectable items list #5902

Closed
the-goodies opened this issue Nov 21, 2022 · 2 comments

Comments

@the-goodies
Copy link

Focused (SetItemDefaultFocus) selectable item is not centered when BeginCombo is opened, it always shows on top. It's very annoying having to scroll up in order to see what is available, and I'm sure it used to be centered (don't remember version).

Tested with 1.87 and 1.89 versions.

selectable.not.centered.mp4
@ocornut
Copy link
Owner

ocornut commented Nov 22, 2022

Thank you for reporting.
Seems like this was broke by 44f8011 and following 8f495e5.

Not sure when I'll finishing investigating/fixing but:

  • I'm currently confused as to why the _CenterY behaviors of ScrollToRectEx() are not using 0.5f in the SetScrollFromPosY() call.
  • can_be_fully_visible_y is false anyhow as the window is appearing and popup have a small size before auto-resizing, those bool may also need to be set differently on an auto-resizing frame.

@ocornut ocornut added the bug label Nov 23, 2022
ocornut added a commit that referenced this issue Nov 24, 2022
…ocus()/ScrollToRectEx() during an appearing form not centering item. (#5902, #2812, #4242, #2900)

Amend 44f8011 and 8f495e5
@ocornut
Copy link
Owner

ocornut commented Nov 24, 2022

Should be fixed by 27c58c3, thank you for reporting!

@ocornut ocornut closed this as completed Nov 24, 2022
ocornut pushed a commit that referenced this issue Dec 20, 2022
…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 (#5902, #2812, #4242, #2900)
Signed-off-by: Neil Bickford <[email protected]>
maztheman pushed a commit to maztheman/imgui that referenced this issue Mar 10, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants