mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
822dc56ef3
This patch replaces the UI-from-JSON mechanism with a more human-friendly DSL. The current implementation simply converts the GML into a JSON object that can be consumed by GUI::Widget::load_from_json(). The parser is not very helpful if you make a mistake. The language offers a very simple way to instantiate any registered Core::Object class by simply saying @ClassName @GUI::Label { text: "Hello friends!" tooltip: ":^)" } Layouts are Core::Objects and can be assigned to the "layout" property: @GUI::Widget { layout: @GUI::VerticalBoxLayout { spacing: 2 margins: [8, 8, 8, 8] } } And finally, child objects are simply nested within their parent: @GUI::Widget { layout: @GUI::HorizontalBoxLayout { } @GUI::Button { text: "OK" } @GUI::Button { text: "Cancel" } } This feels a *lot* more pleasant to write than the JSON we had. The fact that no new code was being written with the JSON mechanism was pretty telling, so let's approach this with developer convenience in mind. :^) |
||
---|---|---|
.. | ||
CLion | ||
Lagom | ||
bochsrc | ||
build-image-grub.sh | ||
build-image-qemu.sh | ||
build-root-filesystem.sh | ||
check-debug-flags.sh | ||
check-style.sh | ||
check-symbols.sh | ||
debug-kernel.sh | ||
grub-ebr.cfg | ||
grub-gpt.cfg | ||
grub-mbr.cfg | ||
lint-ci.sh | ||
lint-clang-format.sh | ||
lint-executable-resources.sh | ||
lint-ipc-ids.sh | ||
lint-missing-resources.sh | ||
lint-shell-scripts.sh | ||
notify_irc.py | ||
refresh-serenity-qtcreator.sh | ||
run.sh | ||
screenshot-000ccc0.png | ||
screenshot-8ea4375.png | ||
screenshot-1133aca.png | ||
screenshot-9145a72.png | ||
screenshot-23263aa.png | ||
screenshot-191112e.png | ||
screenshot-b5521e1.png | ||
screenshot-cdb82f6.png | ||
screenshot-d727005.png | ||
screenshot-ef9fbef.png | ||
screenshot-f8fc892.png | ||
text-to-cpp-string.sh | ||
write-only-on-difference.sh |