mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
Inspector: Add special icon for timer objects
This commit is contained in:
parent
f8daa9ef02
commit
37c71bad8a
Notes:
sideshowbarker
2024-07-19 08:54:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37c71bad8a4
BIN
Base/res/icons/16x16/timer.png
Normal file
BIN
Base/res/icons/16x16/timer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 207 B |
@ -38,6 +38,7 @@ RemoteObjectGraphModel::RemoteObjectGraphModel(RemoteProcess& process)
|
||||
m_object_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/inspector-object.png"));
|
||||
m_window_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png"));
|
||||
m_layout_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/layout.png"));
|
||||
m_timer_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/timer.png"));
|
||||
}
|
||||
|
||||
RemoteObjectGraphModel::~RemoteObjectGraphModel()
|
||||
@ -101,6 +102,8 @@ GUI::Variant RemoteObjectGraphModel::data(const GUI::ModelIndex& index, Role rol
|
||||
if (role == Role::Icon) {
|
||||
if (remote_object->class_name == "Window")
|
||||
return m_window_icon;
|
||||
if (remote_object->class_name == "Timer")
|
||||
return m_timer_icon;
|
||||
if (remote_object->class_name.ends_with("Layout"))
|
||||
return m_layout_icon;
|
||||
return m_object_icon;
|
||||
|
@ -58,4 +58,5 @@ private:
|
||||
GIcon m_object_icon;
|
||||
GIcon m_window_icon;
|
||||
GIcon m_layout_icon;
|
||||
GIcon m_timer_icon;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user