mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
This commit is contained in:
@@ -70,16 +70,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override
|
||||
virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override
|
||||
{
|
||||
if (role == Role::TextAlignment)
|
||||
if (role == GUI::ModelRole::TextAlignment)
|
||||
return Gfx::TextAlignment::CenterLeft;
|
||||
if (role == Role::Font) {
|
||||
if (role == GUI::ModelRole::Font) {
|
||||
if (index.column() == Column::MatchedText)
|
||||
return Gfx::Font::default_fixed_width_font();
|
||||
return {};
|
||||
}
|
||||
if (role == Role::Display) {
|
||||
if (role == GUI::ModelRole::Display) {
|
||||
auto& match = m_matches.at(index.row());
|
||||
switch (index.column()) {
|
||||
case Column::Filename:
|
||||
|
||||
Reference in New Issue
Block a user