mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
parent
9561ec15f4
commit
77ad0fdb07
Notes:
sideshowbarker
2024-07-17 06:29:49 +09:00
Author: https://github.com/AtkinsSJ
Commit: 77ad0fdb07
Pull-request: https://github.com/SerenityOS/serenity/pull/17495
Reviewed-by: https://github.com/awesomekling ✅
64 changed files with 136 additions and 288 deletions
|
@ -118,18 +118,15 @@ PaletteWidget::PaletteWidget()
|
|||
|
||||
m_color_container = add<GUI::Widget>();
|
||||
m_color_container->set_relative_rect(m_secondary_color_widget->relative_rect().right() + 2, 2, 500, 33);
|
||||
m_color_container->set_layout<GUI::VerticalBoxLayout>();
|
||||
m_color_container->layout()->set_spacing(1);
|
||||
m_color_container->set_layout<GUI::VerticalBoxLayout>(GUI::Margins {}, 1);
|
||||
|
||||
auto& top_color_container = m_color_container->add<GUI::Widget>();
|
||||
top_color_container.set_name("top_color_container");
|
||||
top_color_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
top_color_container.layout()->set_spacing(1);
|
||||
top_color_container.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 1);
|
||||
|
||||
auto& bottom_color_container = m_color_container->add<GUI::Widget>();
|
||||
bottom_color_container.set_name("bottom_color_container");
|
||||
bottom_color_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||
bottom_color_container.layout()->set_spacing(1);
|
||||
bottom_color_container.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 1);
|
||||
|
||||
auto result = load_palette_path("/res/color-palettes/default.palette");
|
||||
if (result.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue