1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 03:05:06 +00:00

LibGUI: Add GVariant class and use it for table model data.

This commit is contained in:
Andreas Kling 2019-02-28 16:20:29 +01:00
parent c1f5f2694b
commit 75fabef57b
8 changed files with 152 additions and 6 deletions

View file

@ -100,7 +100,7 @@ void GTableView::paint_event(GPaintEvent&)
auto column_metadata = m_model->column_metadata(column_index);
int column_width = column_metadata.preferred_width;
Rect cell_rect(horizontal_padding + x_offset, y, column_width, item_height());
painter.draw_text(cell_rect, m_model->data(row_index, column_index), column_metadata.text_alignment, text_color);
painter.draw_text(cell_rect, m_model->data(row_index, column_index).to_string(), column_metadata.text_alignment, text_color);
x_offset += column_width + horizontal_padding * 2;
}
++painted_item_index;