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

@ -61,12 +61,15 @@ GUI::Model::ColumnMetadata VBWidgetPropertyModel::column_metadata(int column) co
{
UNUSED_PARAM(column);
if (column == Column::Name)
return { 110, Gfx::TextAlignment::CenterLeft };
return { 90, Gfx::TextAlignment::CenterLeft };
return { 110 };
return { 90 };
}
GUI::Variant VBWidgetPropertyModel::data(const GUI::ModelIndex& index, Role role) const
{
if (role == Role::TextAlignment) {
return Gfx::TextAlignment::CenterLeft;
}
if (role == Role::Font) {
if (index.column() == Column::Name)
return Gfx::Font::default_bold_font();