diff options
-rw-r--r-- | Base/res/icons/16x16/x86.png | bin | 0 -> 194 bytes | |||
-rw-r--r-- | Userland/DevTools/Profiler/main.cpp | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Base/res/icons/16x16/x86.png b/Base/res/icons/16x16/x86.png Binary files differnew file mode 100644 index 0000000000..5edc6380d6 --- /dev/null +++ b/Base/res/icons/16x16/x86.png diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index ece4ba2320..6cf7f55beb 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -141,12 +141,17 @@ int main(int argc, char** argv) tree_view.set_model(profile->model()); auto& disassembly_view = bottom_splitter.add<GUI::TableView>(); + disassembly_view.set_visible(false); tree_view.on_selection = [&](auto& index) { profile->set_disassembly_index(index); disassembly_view.set_model(profile->disassembly_model()); }; + auto disassembly_action = GUI::Action::create_checkable("Show &Disassembly", { Mod_Ctrl, Key_D }, Gfx::Bitmap::load_from_file("/res/icons/16x16/x86.png"), [&](auto& action) { + disassembly_view.set_visible(action.is_checked()); + }); + auto& samples_tab = tab_widget.add_tab<GUI::Widget>("Samples"); samples_tab.set_layout<GUI::VerticalBoxLayout>(); samples_tab.layout()->set_margins({ 4, 4, 4, 4 }); @@ -209,6 +214,8 @@ int main(int argc, char** argv) percent_action->set_checked(false); view_menu.add_action(percent_action); + view_menu.add_action(disassembly_action); + auto& help_menu = menubar->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) { Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/Profiler.md"), "/bin/Help"); |