mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
SpaceAnalyzer: Show status tips in Statusbar
This commit is contained in:
parent
aa7346d23e
commit
f3b08ffc8a
1 changed files with 6 additions and 0 deletions
|
@ -58,6 +58,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& breadcrumbbar = *main_widget->find_descendant_of_type_named<GUI::Breadcrumbbar>("breadcrumbbar");
|
||||
auto& tree_map_widget = *main_widget->find_descendant_of_type_named<SpaceAnalyzer::TreeMapWidget>("tree_map");
|
||||
auto& statusbar = *main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
GUI::Application::the()->on_action_enter = [&statusbar](GUI::Action& action) {
|
||||
statusbar.set_override_text(action.status_tip());
|
||||
};
|
||||
GUI::Application::the()->on_action_leave = [&statusbar](GUI::Action&) {
|
||||
statusbar.set_override_text({});
|
||||
};
|
||||
|
||||
tree_map_widget.set_focus(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue