mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata
This commit is contained in:
@@ -75,6 +75,8 @@ public:
|
||||
|
||||
virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override
|
||||
{
|
||||
if (role == Role::TextAlignment)
|
||||
return Gfx::TextAlignment::CenterLeft;
|
||||
if (role == Role::Font) {
|
||||
if (index.column() == Column::MatchedText)
|
||||
return Gfx::Font::default_fixed_width_font();
|
||||
@@ -94,14 +96,6 @@ public:
|
||||
return {};
|
||||
}
|
||||
|
||||
virtual ColumnMetadata column_metadata(int column) const override
|
||||
{
|
||||
if (column == Column::MatchedText) {
|
||||
return { 0, Gfx::TextAlignment::CenterLeft };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
virtual void update() override { }
|
||||
virtual GUI::ModelIndex index(int row, int column = 0, const GUI::ModelIndex& = GUI::ModelIndex()) const override { return create_index(row, column, &m_matches.at(row)); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user