mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
841b2e5d13
Now that we support more than 2 clients per shared buffer, we can use them for window icons. I didn't do that previously since it would have made the Taskbar process unable to access the icons. This opens up some nice possibilities for programmatically generated icons.
22 lines
506 B
C++
22 lines
506 B
C++
#include "TextEditorWidget.h"
|
|
#include <LibDraw/PNGLoader.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
GApplication app(argc, argv);
|
|
|
|
auto* window = new GWindow;
|
|
window->set_title("Text Editor");
|
|
window->set_rect(20, 200, 640, 400);
|
|
|
|
auto* text_widget = new TextEditorWidget();
|
|
window->set_main_widget(text_widget);
|
|
|
|
if (argc >= 2)
|
|
text_widget->open_sesame(argv[1]);
|
|
|
|
window->show();
|
|
window->set_icon(load_png("/res/icons/TextEditor16.png"));
|
|
|
|
return app.exec();
|
|
}
|