mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
parent
9561ec15f4
commit
77ad0fdb07
64 changed files with 136 additions and 288 deletions
|
@ -73,15 +73,13 @@ TaskbarWindow::TaskbarWindow()
|
|||
ErrorOr<void> TaskbarWindow::populate_taskbar()
|
||||
{
|
||||
auto main_widget = TRY(set_main_widget<TaskbarWidget>());
|
||||
(void)TRY(main_widget->try_set_layout<GUI::HorizontalBoxLayout>());
|
||||
main_widget->layout()->set_margins({ 2, 3, 0, 3 });
|
||||
(void)TRY(main_widget->try_set_layout<GUI::HorizontalBoxLayout>(GUI::Margins { 2, 3, 0, 3 }));
|
||||
|
||||
m_quick_launch = TRY(Taskbar::QuickLaunchWidget::create());
|
||||
TRY(main_widget->try_add_child(*m_quick_launch));
|
||||
|
||||
m_task_button_container = TRY(main_widget->try_add<GUI::Widget>());
|
||||
(void)TRY(m_task_button_container->try_set_layout<GUI::HorizontalBoxLayout>());
|
||||
m_task_button_container->layout()->set_spacing(3);
|
||||
(void)TRY(m_task_button_container->try_set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 3));
|
||||
|
||||
m_default_icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png"sv));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue