mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 20:35:06 +00:00
LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata
This commit is contained in:
parent
3c819b8ff4
commit
2e03bded43
19 changed files with 211 additions and 100 deletions
|
@ -108,16 +108,13 @@ String ProfileModel::column_name(int column) const
|
|||
}
|
||||
}
|
||||
|
||||
GUI::Model::ColumnMetadata ProfileModel::column_metadata(int column) const
|
||||
{
|
||||
if (column == Column::SampleCount || column == Column::SelfCount)
|
||||
return ColumnMetadata { 0, Gfx::TextAlignment::CenterRight };
|
||||
return {};
|
||||
}
|
||||
|
||||
GUI::Variant ProfileModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
{
|
||||
auto* node = static_cast<ProfileNode*>(index.internal_data());
|
||||
if (role == Role::TextAlignment) {
|
||||
if (index.column() == Column::SampleCount || index.column() == Column::SelfCount)
|
||||
return Gfx::TextAlignment::CenterRight;
|
||||
}
|
||||
if (role == Role::Icon) {
|
||||
if (index.column() == Column::StackFrame) {
|
||||
if (node->address() >= 0xc0000000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue