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
|
@ -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