-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
SelectableFlags_SpanAllColumns doesn't span all columns when horizontal scrolling #3187
Labels
Comments
It doesn't seem to solve the issue completely with Tables. When scrolling horizontally (with SpanAllColumns), it does highlight the entire row BUT clicking at the area scrolled in is ignored. |
Thanks @PazerOP for reporting this. Various tests for it:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear ImGui version/build info:
Version/Branch of Dear ImGui:
Lastest commit on master at the current time, a2454f2
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
Compiler: VS2019 16.5.0
Operating System: Windows 10 1909 (18363)
My Issue/Question:
When the current window is scrolled horizontally,
ImGuiSelectableFlags_SpanAllColumns
doesn't work properly. It appears to stop where the visible area would end if the window was not being scrolled horizontally. This is not just a cosmetic issue, it affects hit testing as well (moving the mouse to the right of the blue area in the selectable causes it to leave the hovered state).I considered submitting a pull request that changed
window->ContentRegionRect
towindow->DC.CurrentColumns->HostWorkRect
on both lines ofimgui/imgui_widgets.cpp
Lines 5617 to 5618 in a2454f2
Screenshots/Video
The minimal example code below produces the following window:
![image](https://user-images.githubusercontent.com/6569500/80891719-b93e7b80-8c7a-11ea-87f3-bb6258a3ea85.png)
However, if we scroll to the right, we see the selectable in the first column is actually clamped to the initially visible region of the window:
![image](https://user-images.githubusercontent.com/6569500/80891747-0884ac00-8c7b-11ea-97e9-0552a9399090.png)
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: