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

LibGUI: Models should always specify font via Model::Role::Font

This gets rid of one field in ColumnData. The goal is to get rid of all
fields and lose ColumnData entirely.
This commit is contained in:
Andreas Kling 2020-05-21 18:56:52 +02:00
parent 57d15acd4c
commit 04187576ff
8 changed files with 23 additions and 26 deletions

View file

@ -166,9 +166,6 @@ NonnullRefPtr<Gfx::Font> AbstractView::font_for_index(const ModelIndex& index) c
if (font_data.is_font())
return font_data.as_font();
auto column_metadata = model()->column_metadata(index.column());
if (column_metadata.font)
return *column_metadata.font;
return font();
}