diff --git a/Userland/Applications/Browser/InspectorWidget.cpp b/Userland/Applications/Browser/InspectorWidget.cpp index 072b42ec3e..62d7e94efc 100644 --- a/Userland/Applications/Browser/InspectorWidget.cpp +++ b/Userland/Applications/Browser/InspectorWidget.cpp @@ -58,18 +58,27 @@ void InspectorWidget::set_inspected_node(GUI::ModelIndex const index) InspectorWidget::InspectorWidget() { - set_layout(); + set_fill_with_background_color(true); + + auto& layout = set_layout(); + layout.set_margins({ 4, 4, 4, 4 }); auto& splitter = add(); auto& top_tab_widget = splitter.add(); - m_dom_tree_view = top_tab_widget.add_tab("DOM"); + auto& dom_tree_container = top_tab_widget.add_tab("DOM"); + dom_tree_container.set_layout(); + dom_tree_container.layout()->set_margins({ 4, 4, 4, 4 }); + m_dom_tree_view = dom_tree_container.add(); m_dom_tree_view->on_selection_change = [this] { const auto& index = m_dom_tree_view->selection().first(); set_inspected_node(index); }; - m_layout_tree_view = top_tab_widget.add_tab("Layout"); + auto& layout_tree_container = top_tab_widget.add_tab("Layout"); + layout_tree_container.set_layout(); + layout_tree_container.layout()->set_margins({ 4, 4, 4, 4 }); + m_layout_tree_view = layout_tree_container.add(); m_layout_tree_view->on_selection_change = [this] { const auto& index = m_layout_tree_view->selection().first(); set_inspected_node(index); @@ -77,8 +86,17 @@ InspectorWidget::InspectorWidget() auto& bottom_tab_widget = splitter.add(); - m_style_table_view = bottom_tab_widget.add_tab("Styles"); - m_computed_style_table_view = bottom_tab_widget.add_tab("Computed"); + auto& style_table_container = bottom_tab_widget.add_tab("Styles"); + style_table_container.set_layout(); + style_table_container.layout()->set_margins({ 4, 4, 4, 4 }); + m_style_table_view = style_table_container.add(); + + auto& computed_style_table_container = bottom_tab_widget.add_tab("Computed"); + computed_style_table_container.set_layout(); + computed_style_table_container.layout()->set_margins({ 4, 4, 4, 4 }); + m_computed_style_table_view = computed_style_table_container.add(); + + m_dom_tree_view->set_focus(true); } InspectorWidget::~InspectorWidget()