mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-22 11:23:37 +00:00
Tables: Headers: fixed label being clipped early to reserve space for a sort marker even when no sort marker is displayed.
Amend 892b48e2d6: while fixing auto fit this was ditched.
This commit is contained in:
@@ -58,6 +58,9 @@ Other Changes:
|
||||
- Tables:
|
||||
- Context Menu: added a "Reset" sub-menu with a "Reset Visibility" option.
|
||||
(which is greyed out when using default settings)
|
||||
- Headers: fixed label being clipped early to reserve space for a sort marker
|
||||
even when no sort marker is displayed. Auto-fitting a column still accounts
|
||||
for the possible marker, so that sorting after an auto-fit doesn't clip the label.
|
||||
- Fonts:
|
||||
- Added `IMGUI_DISABLE_DEFAULT_FONT_BITMAP`/`IMGUI_DISABLE_DEFAULT_FONT_VECTOR` to
|
||||
disable embedding either fonts separately. (#9407)
|
||||
|
||||
@@ -3288,7 +3288,9 @@ void ImGui::TableHeader(const char* label)
|
||||
}
|
||||
|
||||
// Sort order arrow
|
||||
const float ellipsis_max = ImMax(cell_r.Max.x - w_arrow - w_sort_text, label_pos.x);
|
||||
// - Only clip label for a visible arrow. Auto-fit still accounts for a possible arrow, but when
|
||||
// manually sized smaller we don't clip the label for the sake of an arrow that isn't displayed.
|
||||
const float ellipsis_max = ImMax(cell_r.Max.x - (sort_arrow ? w_arrow + w_sort_text : 0.0f), label_pos.x);
|
||||
if ((table->Flags & ImGuiTableFlags_Sortable) && !(column->Flags & ImGuiTableColumnFlags_NoSort))
|
||||
{
|
||||
if (column->SortOrder != -1)
|
||||
|
||||
Reference in New Issue
Block a user