Skip to content

Commit 7734874

Browse files
v-einhoffstadt
authored andcommitted
fix (tables): fonts bound to table_row do get applied to the row
1 parent 572541e commit 7734874

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mvTables.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ void mvTable::draw(ImDrawList* drawlist, float x, float y)
178178
cleanup_local_theming(prev_visible_row);
179179
apply_local_theming(row);
180180

181+
if (row->font)
182+
{
183+
ImFont* fontptr = static_cast<mvFont*>(row->font.get())->getFontPtr();
184+
ImGui::PushFont(fontptr);
185+
}
186+
181187
row->state.lastFrameUpdate = GContext->frame;
182188
row->state.visible = true;
183189

@@ -224,6 +230,9 @@ void mvTable::draw(ImDrawList* drawlist, float x, float y)
224230
cleanup_local_theming(cell.get());
225231
cleanup_local_theming(columnItem.get());
226232
}
233+
234+
if (row->font)
235+
ImGui::PopFont();
227236
};
228237

229238
handleImmediateScroll();

0 commit comments

Comments
 (0)