|
@@ -10150,11 +10150,21 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|
|
TabItemBackground(display_draw_list, bb, flags, tab_col);
|
|
|
if (tab_contents_visible && (tab_bar->Flags & ImGuiTabBarFlags_DrawSelectedOverline) && style.TabBarOverlineSize > 0.0f)
|
|
|
{
|
|
|
- float x_offset = IM_TRUNC(0.4f * style.TabRounding);
|
|
|
- if (x_offset < 2.0f * g.CurrentDpiScale)
|
|
|
- x_offset = 0.0f;
|
|
|
- float y_offset = 1.0f * g.CurrentDpiScale;
|
|
|
- display_draw_list->AddLine(bb.GetTL() + ImVec2(x_offset, y_offset), bb.GetTR() + ImVec2(-x_offset, y_offset), GetColorU32(tab_bar_focused ? ImGuiCol_TabSelectedOverline : ImGuiCol_TabDimmedSelectedOverline), style.TabBarOverlineSize);
|
|
|
+ // Might be moved to TabItemBackground() ?
|
|
|
+ ImVec2 tl = bb.GetTL() + ImVec2(0, 1.0f * g.CurrentDpiScale);
|
|
|
+ ImVec2 tr = bb.GetTR() + ImVec2(0, 1.0f * g.CurrentDpiScale);
|
|
|
+ ImU32 overline_col = GetColorU32(tab_bar_focused ? ImGuiCol_TabSelectedOverline : ImGuiCol_TabDimmedSelectedOverline);
|
|
|
+ if (style.TabRounding > 0.0f)
|
|
|
+ {
|
|
|
+ float rounding = style.TabRounding;
|
|
|
+ display_draw_list->PathArcToFast(tl + ImVec2(+rounding, +rounding), rounding, 7, 9);
|
|
|
+ display_draw_list->PathArcToFast(tr + ImVec2(-rounding, +rounding), rounding, 9, 11);
|
|
|
+ display_draw_list->PathStroke(overline_col, 0, style.TabBarOverlineSize);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ display_draw_list->AddLine(tl - ImVec2(0.5f, 0.5f), tr - ImVec2(0.5f, 0.5f), overline_col, style.TabBarOverlineSize);
|
|
|
+ }
|
|
|
}
|
|
|
RenderNavCursor(bb, id);
|
|
|
|