mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 23:07:35 +00:00
SystemMonitor: Simplify executable icon lookup in ProcessModel
This commit is contained in:
parent
a2686f9bec
commit
1c52dc86ee
1 changed files with 1 additions and 4 deletions
|
@ -265,10 +265,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
||||||
case Column::Icon: {
|
case Column::Icon: {
|
||||||
if (thread.current_state.kernel)
|
if (thread.current_state.kernel)
|
||||||
return m_kernel_process_icon;
|
return m_kernel_process_icon;
|
||||||
auto icon = GUI::FileIconProvider::icon_for_executable(thread.current_state.executable).bitmap_for_size(16);
|
return GUI::FileIconProvider::icon_for_executable(thread.current_state.executable);
|
||||||
if (!icon)
|
|
||||||
return GUI::Icon();
|
|
||||||
return GUI::Icon(*icon);
|
|
||||||
}
|
}
|
||||||
case Column::PID:
|
case Column::PID:
|
||||||
return thread.current_state.pid;
|
return thread.current_state.pid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue