mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Internals: Reworked RenderTextEllipsis() to satisfy what we need for table headers.
This commit is contained in:
parent
4597632662
commit
5ae268c0a3
2 changed files with 15 additions and 6 deletions
|
|
@ -7077,7 +7077,7 @@ bool ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb,
|
|||
text_pixel_clip_bb.Max.x -= close_button_sz;
|
||||
}
|
||||
|
||||
float ellipsis_max_x = close_button_visible ? -FLT_MAX : bb.Max.x;
|
||||
float ellipsis_max_x = close_button_visible ? text_pixel_clip_bb.Max.x : bb.Max.x - 1.0f;
|
||||
RenderTextEllipsis(draw_list, text_ellipsis_clip_bb.Min, text_ellipsis_clip_bb.Max, text_pixel_clip_bb.Max.x, ellipsis_max_x, label, NULL, &label_size);
|
||||
|
||||
return close_button_pressed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue