ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
59.75k stars 10.17k forks source link

SameLine Vertical Alignment Wrong after a multi-component group #4509

Open atom0s opened 3 years ago

atom0s commented 3 years ago

Version/Branch of Dear ImGui:

Back-end/Renderer/Compiler/OS

My Issue/Question:

When using some controls, the alignment of SameLine is not properly vertically aligned. This can be seen in the demo examples included with imgui straight from current master branch.

Controls that I have noticed offhand this happens to:

This can be seen easily under the following of the demo window:

Screenshots/Video

example_win32_directx9_ntFTx52g9c

The (?) help text is not properly aligned vertically to the other text of the control on the same line.

Standalone, minimal, complete and verifiable example: (see https://github.com/ocornut/imgui/issues/2261)

Use the current demo (Direct3D9) and it can be replicated from stock code.

ocornut commented 3 years ago

I believe this is a variation of #4190

The "text baseline" info is held on a per-line basis and Group/SameLine/Group can't really pass it on from one side to another. However in the case of the widget you are pointing out here, it seems like we should be able to come up with a simple fix. I'll look soon.