@ -1840,15 +1840,14 @@ void ImGui::TableEndRow(ImGuiTable* table)
bg_col1 = table - > RowBgColor [ 1 ] ;
// Decide of top border color
ImU32 border_col = 0 ;
ImU32 top_ border_col = 0 ;
const float border_size = TABLE_BORDER_SIZE ;
if ( table - > CurrentRow > 0 | | table - > InnerWindow = = table - > OuterWindow )
if ( table - > Flags & ImGuiTableFlags_BordersInnerH )
border_col = ( table - > LastRowFlags & ImGuiTableRowFlags_Headers ) ? table - > BorderColorStrong : table - > BorderColorLight ;
if ( table - > CurrentRow > 0 & & ( table - > Flags & ImGuiTableFlags_BordersInnerH ) )
top_border_col = ( table - > LastRowFlags & ImGuiTableRowFlags_Headers ) ? table - > BorderColorStrong : table - > BorderColorLight ;
const bool draw_cell_bg_color = table - > RowCellDataCurrent > = 0 ;
const bool draw_strong_bottom_border = unfreeze_rows_actual ;
if ( ( bg_col0 | bg_col1 | border_col ) ! = 0 | | draw_strong_bottom_border | | draw_cell_bg_color )
if ( ( bg_col0 | bg_col1 | top_ border_col) ! = 0 | | draw_strong_bottom_border | | draw_cell_bg_color )
{
// In theory we could call SetWindowClipRectBeforeSetChannel() but since we know TableEndRow() is
// always followed by a change of clipping rectangle we perform the smallest overwrite possible here.
@ -1887,8 +1886,8 @@ void ImGui::TableEndRow(ImGuiTable* table)
}
// Draw top border
if ( border_col & & bg_y1 > = table - > BgClipRect . Min . y & & bg_y1 < table - > BgClipRect . Max . y )
window - > DrawList - > AddLine ( ImVec2 ( table - > BorderX1 , bg_y1 ) , ImVec2 ( table - > BorderX2 , bg_y1 ) , border_col , border_size ) ;
if ( top_ border_col & & bg_y1 > = table - > BgClipRect . Min . y & & bg_y1 < table - > BgClipRect . Max . y )
window - > DrawList - > AddLine ( ImVec2 ( table - > BorderX1 , bg_y1 ) , ImVec2 ( table - > BorderX2 , bg_y1 ) , top_ border_col, border_size ) ;
// Draw bottom border at the row unfreezing mark (always strong)
if ( draw_strong_bottom_border & & bg_y2 > = table - > BgClipRect . Min . y & & bg_y2 < table - > BgClipRect . Max . y )