ocornut / imgui

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

ImGuiTableFlags_NoBordersInBodyH #7668

Open roaral opened 2 months ago

roaral commented 2 months ago

Version/Branch of Dear ImGui:

Version 1.90.0, Branch: master

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

Linux + GCC

Full config/build information:

No response

Details:

Add ImGuiTableFlags_NoBordersInBodyH:

Todays ImGuiTableFlags_NoBordersInBody is basically ImGuiTableFlags_NoBordersInBodyV. What I want, for the perfect look, is ImGuiTableFlags_NoBordersInBodyH. Using ImGuiTableFlags_RowBg I really don't need the horizontal borders in the body, but the vertical ones makes it clearer where the columns are.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

ocornut commented 2 months ago

Don’t enable ImGuiTableFlags_BordersInnerH ?

roaral commented 2 months ago

Don’t enable ImGuiTableFlags_BordersInnerH ?

I tried many combinations. Currently, I am using ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersInnerV, and I have a header. RowBg separates each line of the table from the others, so I don't need BordersInnerH. However (and I guess this is due to my color selection, which follows a particular palette) the header line and the second table line get very similar colors, and it isn't clear that it is a header.

I was wondering if I could make the header stand out by adding a border below it, so I tried various things like RowBg | BordersInnerV | BordersInnerH | NoBordersInBody. That is when I observed that NoBordersInBody only removed the vertical borders in body, when what I wanted was removing only the horizontal borders in body, except the border below the header, and I thought it could have been achieved with RowBg | BordersInnerV | BordersInnerH | NoBordersInBodyH.