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

Incorrect text clipping #512

Closed
nem0 opened this issue Jan 27, 2016 · 4 comments
Closed

Incorrect text clipping #512

nem0 opened this issue Jan 27, 2016 · 4 comments
Labels

Comments

@nem0
Copy link
Contributor

nem0 commented Jan 27, 2016

imgui_clip_error

With ImGui::PushItemWidth and FramePadding > 0, text is not correctly clipped in ImGui::InputText

It seems to be caused by this:

    const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x + style.FramePadding.x*2.0f, frame_bb.Min.y + size.y + style.FramePadding.y*2.0f);

With FramePadding == 0, everything looks ok

@ocornut ocornut added the bug label Jan 29, 2016
@itamago
Copy link

itamago commented Jan 29, 2016

Yeah, I have the same issue with ImGuiListClipper and InputText, but vertically.
And it is flickering when dragging the scrollbar.
Without ImGuiListClipper, everything is clipped correctly (but more expensive in terms of CPU)

@itamago itamago mentioned this issue Jan 29, 2016
@ocornut
Copy link
Owner

ocornut commented Jan 29, 2016

I think your issue is completely different here. Nem0 is referring to the input box contents not being clipped within the frame properly, because i'm miscalculating the aabb for cpu-side clipping of the vertices.

@itamago
Copy link

itamago commented Jan 29, 2016

ok, sorry

@ocornut
Copy link
Owner

ocornut commented Jan 30, 2016

Fixed. I think the issue started appearing along with my cleanups of last week, e.g.
570a9da

@ocornut ocornut closed this as completed Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants