From d6ff64db005d8af8fc243f3c99e21ba9c72a6961 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 9 Apr 2019 02:21:24 +0200 Subject: [PATCH] Launcher: Add tooltips to LauncherButtons. --- Applications/Launcher/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Applications/Launcher/main.cpp b/Applications/Launcher/main.cpp index cc1fd4eb472e4b..aab2386c3ded1d 100644 --- a/Applications/Launcher/main.cpp +++ b/Applications/Launcher/main.cpp @@ -35,10 +35,11 @@ int main(int argc, char** argv) class LauncherButton final : public GButton { public: - LauncherButton(const String& icon_path, const String& exec_path, GWidget* parent) + LauncherButton(const String& name, const String& icon_path, const String& exec_path, GWidget* parent) : GButton(parent) , m_executable_path(exec_path) { + set_tooltip(name); set_button_style(ButtonStyle::CoolBar); set_icon(GraphicsBitmap::load_from_file(icon_path)); set_preferred_size({ 50, 50 }); @@ -69,10 +70,10 @@ GWindow* make_launcher_window() widget->layout()->set_margins({ 5, 5, 5, 5 }); window->set_main_widget(widget); - new LauncherButton("/res/icons/Terminal.png", "/bin/Terminal", widget); - new LauncherButton("/res/icons/FontEditor.png", "/bin/FontEditor", widget); - new LauncherButton("/res/icons/32x32/filetype-folder.png", "/bin/FileManager", widget); - new LauncherButton("/res/icons/TextEditor.png", "/bin/TextEditor", widget); + new LauncherButton("Terminal", "/res/icons/Terminal.png", "/bin/Terminal", widget); + new LauncherButton("FontEditor", "/res/icons/FontEditor.png", "/bin/FontEditor", widget); + new LauncherButton("FileManager", "/res/icons/32x32/filetype-folder.png", "/bin/FileManager", widget); + new LauncherButton("TextEditor", "/res/icons/TextEditor.png", "/bin/TextEditor", widget); return window; }