Skip to content

Commit

Permalink
Launcher: Add tooltips to LauncherButtons.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Apr 9, 2019
1 parent 26a06f3 commit d6ff64d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Applications/Launcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down Expand Up @@ -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;
}

0 comments on commit d6ff64d

Please sign in to comment.