1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Userland+LibGUI: Make Margins arguments match CSS ordering

Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
This commit is contained in:
sin-ack 2021-08-17 00:10:51 +00:00 committed by Andreas Kling
parent c17f9adb12
commit 9c9a5c55cb
Notes: sideshowbarker 2024-07-18 05:33:42 +09:00
43 changed files with 78 additions and 78 deletions

View file

@ -43,7 +43,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window
auto& left_container = content_container.add<Widget>();
left_container.set_fixed_width(60);
left_container.set_layout<VerticalBoxLayout>();
left_container.layout()->set_margins({ 0, 12, 0, 0 });
left_container.layout()->set_margins({ 12, 0, 0, 0 });
if (icon) {
auto& icon_wrapper = left_container.add<Widget>();
@ -56,13 +56,13 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Window
auto& right_container = content_container.add<Widget>();
right_container.set_layout<VerticalBoxLayout>();
right_container.layout()->set_margins({ 0, 12, 4, 4 });
right_container.layout()->set_margins({ 12, 4, 4, 0 });
auto make_label = [&](const StringView& text, bool bold = false) {
auto& label = right_container.add<Label>(text);
label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
label.set_fixed_height(14);
label.set_content_margins({ 0, 0, 8, 0 });
label.set_content_margins({ 0, 8, 0, 0 });
if (bold)
label.set_font(Gfx::FontDatabase::default_font().bold_variant());
};