HelloWorld: Set window icon to app-hello-world.png

This commit is contained in:
Linus Groh 2020-08-29 19:22:01 +02:00 committed by Andreas Kling
parent c288b499aa
commit d61ea0da5f
Notes: sideshowbarker 2024-07-19 03:01:24 +09:00

View file

@ -38,6 +38,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->resize(240, 160);
window->set_title("Hello World!");
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hello-world.png"));
auto& main_widget = window->set_main_widget<GUI::Widget>();
main_widget.set_fill_with_background_color(true);