mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +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
@ -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…
Reference in New Issue
Block a user