1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

Applications: Use GUI::Icon::default_icon to set application icon

This commit is contained in:
Brendan Coles 2020-11-02 19:30:17 +00:00 committed by Andreas Kling
parent 6861cb8a23
commit 5ed7ca3627
14 changed files with 55 additions and 22 deletions

View file

@ -25,6 +25,7 @@
*/
#include "HexEditorWidget.h"
#include <LibGUI/Icon.h>
#include <LibGfx/Bitmap.h>
#include <stdio.h>
@ -42,6 +43,8 @@ int main(int argc, char** argv)
return 1;
}
auto app_icon = GUI::Icon::default_icon("app-hexeditor");
auto window = GUI::Window::construct();
window->set_title("Hex Editor");
window->resize(640, 400);
@ -55,7 +58,7 @@ int main(int argc, char** argv)
};
window->show();
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hexeditor.png"));
window->set_icon(app_icon.bitmap_for_size(16));
if (argc >= 2)
hex_editor_widget.open_file(argv[1]);