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

commit "Fix bug where width padding was applied twice" regression #79

Closed
crazyBaboon opened this issue Mar 10, 2020 · 2 comments · Fixed by #80
Closed

commit "Fix bug where width padding was applied twice" regression #79

crazyBaboon opened this issue Mar 10, 2020 · 2 comments · Fixed by #80

Comments

@crazyBaboon
Copy link
Contributor

crazyBaboon commented Mar 10, 2020

Hi @Hejsil ,

Apparently, commit 14dd68e "Fix bug where width padding was applied twice" introduces a regression in the code. To visualise the bug introduced in this commit:

1 - build the demo glfw_opengl3 and run it;

2 - Go to overview -> Widgets -> Combo -> Fist

Note all the items text, Pistol, Fist, Shotgun are all squashed to the left, without any spacing and with the first capital letter disappearing halfway:

Uploading Screenshot at 2020-03-10 21-14-20.png…

Ubuntu-Mate 18.04 - 64 bit.

@Hejsil
Copy link
Contributor

Hejsil commented Mar 11, 2020

Aaah, so this was my fault. I'll look into this right now.

@Hejsil
Copy link
Contributor

Hejsil commented Mar 11, 2020

Looking a little into to with some printf debugging I can see that a SCISSOR command is being outputted with an X coordinate that exceeds the text being written.

NK_COMMAND_SCISSOR: 41 299 180 159 // Suspicious SCISSOR x: 41
NK_COMMAND_RECT_FILLED: 36 302 200 30 0
NK_COMMAND_RECT_FILLED: 37 303 188 25 0
NK_COMMAND_TEXT: 39 309 184 10 Fist // Text drawn at x: 39
NK_COMMAND_RECT_FILLED: 36 331 200 30 0
NK_COMMAND_RECT_FILLED: 37 332 188 25 0
NK_COMMAND_TEXT: 39 338 184 10 Pistol
NK_COMMAND_RECT_FILLED: 36 360 200 30 0
NK_COMMAND_RECT_FILLED: 37 361 188 25 0
NK_COMMAND_TEXT: 39 367 184 10 Shotgun
NK_COMMAND_RECT_FILLED: 36 389 200 30 0
NK_COMMAND_RECT_FILLED: 37 390 188 25 0
NK_COMMAND_TEXT: 39 396 184 10 Plasma
NK_COMMAND_RECT_FILLED: 36 418 200 30 0
NK_COMMAND_RECT_FILLED: 37 419 188 25 0

Time to find where this SCISSOR is being emitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants