1
Fork 0
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:
Sam Atkins 2023-06-17 17:01:51 +01:00 committed by Andreas Kling
parent aa7346d23e
commit f3b08ffc8a

View file

@ -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);