diff options
author | Brendan Coles <bcoles@gmail.com> | 2020-11-02 19:30:17 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-02 21:06:17 +0100 |
commit | 5ed7ca3627717634728cd90ee34168e9b3dd95e2 (patch) | |
tree | 87ce2163ceda705bdcd8ef3b6957c863346632e0 /Applications/Piano | |
parent | 6861cb8a23ff0bce02edc03fabd098e8a92ecf53 (diff) | |
download | serenity-5ed7ca3627717634728cd90ee34168e9b3dd95e2.zip |
Applications: Use GUI::Icon::default_icon to set application icon
Diffstat (limited to 'Applications/Piano')
-rw-r--r-- | Applications/Piano/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Applications/Piano/main.cpp b/Applications/Piano/main.cpp index 6a57711c92..fa002f8fc9 100644 --- a/Applications/Piano/main.cpp +++ b/Applications/Piano/main.cpp @@ -52,11 +52,12 @@ int main(int argc, char** argv) TrackManager track_manager; + auto app_icon = GUI::Icon::default_icon("app-piano"); auto window = GUI::Window::construct(); auto& main_widget = window->set_main_widget<MainWidget>(track_manager); window->set_title("Piano"); window->resize(840, 600); - window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-piano.png")); + window->set_icon(app_icon.bitmap_for_size(16)); window->show(); Audio::WavWriter wav_writer; @@ -119,7 +120,7 @@ int main(int argc, char** argv) auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) { - GUI::AboutDialog::show("Piano", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-piano.png"), window); + GUI::AboutDialog::show("Piano", app_icon.bitmap_for_size(32), window); })); app->set_menubar(move(menubar)); |