1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:28:11 +00:00

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

This commit is contained in:
Andreas Kling 2020-05-21 19:36:09 +02:00
parent 3c819b8ff4
commit 2e03bded43
19 changed files with 211 additions and 100 deletions

View file

@ -61,13 +61,15 @@ GUI::Model::ColumnMetadata IRCChannelMemberListModel::column_metadata(int column
{
switch (column) {
case Column::Name:
return { 70, Gfx::TextAlignment::CenterLeft };
return { 70 };
}
ASSERT_NOT_REACHED();
}
GUI::Variant IRCChannelMemberListModel::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: