LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata

This commit is contained in:
Andreas Kling 2020-05-21 19:36:09 +02:00
commit 2e03bded43
Notes: sideshowbarker 2024-07-19 06:16:42 +09:00
19 changed files with 211 additions and 100 deletions

View file

@ -63,13 +63,15 @@ GUI::Model::ColumnMetadata IRCWindowListModel::column_metadata(int column) const
{
switch (column) {
case Column::Name:
return { 70, Gfx::TextAlignment::CenterLeft };
return { 70 };
}
ASSERT_NOT_REACHED();
}
GUI::Variant IRCWindowListModel::data(const GUI::ModelIndex& index, Role role) const
{
if (role == Role::TextAlignment)
return Gfx::TextAlignment::CenterLeft;
if (role == Role::Display) {
switch (index.column()) {
case Column::Name: {