From aa7346d23efe9f257fda5586cd5a23150f81dc9b Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 17 Jun 2023 16:54:33 +0100 Subject: [PATCH] HexEditor: Show status tips in Statusbar --- Userland/Applications/HexEditor/HexEditorWidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index f5841e7273..fe027b3333 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -272,6 +272,13 @@ HexEditorWidget::HexEditorWidget() m_statusbar->segment(0).set_action(*m_goto_offset_action); m_editor->set_focus(true); + + GUI::Application::the()->on_action_enter = [this](GUI::Action& action) { + m_statusbar->set_override_text(action.status_tip()); + }; + GUI::Application::the()->on_action_leave = [this](GUI::Action&) { + m_statusbar->set_override_text({}); + }; } void HexEditorWidget::update_inspector_values(size_t position)