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

Angled Table Headers #6917

Closed
ocornut opened this issue Oct 12, 2023 · 2 comments
Closed

Angled Table Headers #6917

ocornut opened this issue Oct 12, 2023 · 2 comments

Comments

@ocornut
Copy link
Owner

ocornut commented Oct 12, 2023

Posting a thread here as it hasn't be discussed on github before afaik.
Linking to #3740

table angled headers 2

  • Added angled headers support. You need to set ImGuiTableColumnFlags_AngledHeader on selected columns and call TableAngledHeadersRow().
  • Added style.TableAngledHeadersAngle style option.
  • Added ImGuiTableFlags_HighlightHoveredColumn table flag.
  • Added Demo->Tables->Angled Headers.

Some constraints/possible improvements:

  • This can only be submitted once per table, and as the first row.
  • If used, the locked/frozen columns must not contains angled header.
  • The angled headers currently highlight but are not interactive (need to click on the empty rectangle below it for reorder, context-menu etc.).
  • It's currently using an extra draw call that would probably be removed with a bit of rework. I'll do that eventually.
ocornut added a commit that referenced this issue Feb 19, 2024
…round fill drawn too low. Fixed row geometry with non-small values of CellPadding. (#6917)
ocornut added a commit that referenced this issue Feb 19, 2024
ocornut added a commit that referenced this issue Feb 19, 2024
@ocornut
Copy link
Owner Author

ocornut commented Feb 19, 2024

Pushed various fixes and support for multi-line labels in angled headers:
image

ocornut added a commit that referenced this issue Apr 30, 2024
ocornut pushed a commit that referenced this issue May 3, 2024
@ocornut
Copy link
Owner Author

ocornut commented May 23, 2024

FYI as part of https://github.com/ocornut/imgui/releases/tag/v1.90.6 @thedmd and I added support for adjusting alignments of angled headers, and made fixes for multi-line headers: (it wasn't simple)
table angled headers 4

Closing this now!

@ocornut ocornut closed this as completed May 23, 2024
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

1 participant