From bd8e16b70454712c1027f7f7114b6ffb4749b5b9 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sun, 4 Jun 2023 14:06:08 +0200 Subject: [PATCH] CharacterMap: Override statusbar text on action hover We have quite a lot of nicely described action status tips here that we have never shown. Let's change that! --- Userland/Applications/CharacterMap/CharacterMapWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Userland/Applications/CharacterMap/CharacterMapWidget.cpp b/Userland/Applications/CharacterMap/CharacterMapWidget.cpp index fb0b37d8a1..590dd69831 100644 --- a/Userland/Applications/CharacterMap/CharacterMapWidget.cpp +++ b/Userland/Applications/CharacterMap/CharacterMapWidget.cpp @@ -145,6 +145,14 @@ CharacterMapWidget::CharacterMapWidget() m_unicode_block_listview->horizontal_scrollbar().set_visible(false); m_unicode_block_listview->set_cursor(m_unicode_block_model->index(0, 0), GUI::AbstractView::SelectionUpdate::Set); + 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({}); + }; + did_change_font(); update_statusbar(); }