mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
Fixed minor text clipping issue in window title for when using font straying above usual line (#699)
This commit is contained in:
parent
c4db79f34b
commit
9cb271f4c8
1 changed files with 2 additions and 1 deletions
|
|
@ -4265,7 +4265,8 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||
if (style.WindowTitleAlign & ImGuiAlign_Center) pad_right = pad_left;
|
||||
if (pad_left) text_min.x += g.FontSize + style.ItemInnerSpacing.x;
|
||||
if (pad_right) text_max.x -= g.FontSize + style.ItemInnerSpacing.x;
|
||||
RenderTextClipped(text_min, text_max, name, NULL, &text_size, style.WindowTitleAlign, NULL, &clip_max);
|
||||
ImVec2 clip_min = ImVec2(text_min.x, window->Pos.y);
|
||||
RenderTextClipped(text_min, text_max, name, NULL, &text_size, style.WindowTitleAlign, &clip_min, &clip_max);
|
||||
}
|
||||
|
||||
// Save clipped aabb so we can access it in constant-time in FindHoveredWindow()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue