1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

Move apps into a top-level Applications/ directory.

This commit is contained in:
Andreas Kling 2019-02-10 08:35:01 +01:00
parent 29f2a22d34
commit 2cf1dd5b6f
27 changed files with 30 additions and 26 deletions

View file

@ -0,0 +1,35 @@
#include "FontEditor.h"
#include <LibGUI/GEventLoop.h>
#include <LibGUI/GWindow.h>
#include <stdio.h>
int main(int argc, char** argv)
{
RetainPtr<Font> edited_font;
String path;
if (argc == 2) {
path = argv[1];
edited_font = Font::load_from_file(path);
if (!edited_font) {
fprintf(stderr, "Couldn't load font: %s\n", path.characters());
return 1;
}
}
if (edited_font)
edited_font = edited_font->clone();
else
edited_font = Font::default_font().clone();
GEventLoop loop;
auto* window = new GWindow;
window->set_title("FontEditor");
window->set_rect({ 50, 50, 420, 200 });
auto* font_editor = new FontEditorWidget(path, move(edited_font));
font_editor->set_relative_rect({ 0, 0, 420, 200 });
window->set_main_widget(font_editor);
window->set_should_exit_app_on_close(true);
window->show();
return loop.exec();
}