mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:05:07 +00:00
ProfileViewer: Add mode that shows percentages instead of sample counts
Sometimes it's much nicer to work with percentages than raw sample counts when browsing through a profile. :^)
This commit is contained in:
parent
8effe0b632
commit
058cd1241e
4 changed files with 37 additions and 4 deletions
|
@ -84,6 +84,15 @@ int main(int argc, char** argv)
|
|||
invert_action->set_checked(false);
|
||||
view_menu->add_action(invert_action);
|
||||
|
||||
auto percent_action = GUI::Action::create("Show percentages", { Mod_Ctrl, Key_P }, [&](auto& action) {
|
||||
action.set_checked(!action.is_checked());
|
||||
profile->set_show_percentages(action.is_checked());
|
||||
tree_view->update();
|
||||
});
|
||||
percent_action->set_checkable(true);
|
||||
percent_action->set_checked(false);
|
||||
view_menu->add_action(percent_action);
|
||||
|
||||
menubar->add_menu(move(view_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue