1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibGUI: Convert GToolBar to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 16:27:54 +02:00
parent b78225941d
commit f4531c976c
6 changed files with 10 additions and 8 deletions

View file

@ -48,8 +48,8 @@ int main(int argc, char** argv)
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
widget->layout()->set_spacing(0);
auto* main_toolbar = new GToolBar(widget);
auto* location_toolbar = new GToolBar(widget);
auto main_toolbar = GToolBar::construct(widget);
auto location_toolbar = GToolBar::construct(widget);
location_toolbar->layout()->set_margins({ 6, 3, 6, 3 });
location_toolbar->set_preferred_size(0, 25);

View file

@ -160,7 +160,7 @@ void IRCAppWindow::setup_widgets()
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
widget->layout()->set_spacing(0);
auto* toolbar = new GToolBar(widget);
auto toolbar = GToolBar::construct(widget);
toolbar->set_has_frame(false);
toolbar->add_action(*m_change_nick_action);
toolbar->add_separator();

View file

@ -106,7 +106,7 @@ int main(int argc, char** argv)
process_table_container->layout()->set_margins({ 4, 0, 4, 4 });
process_table_container->layout()->set_spacing(0);
auto* toolbar = new GToolBar(process_table_container);
auto toolbar = GToolBar::construct(process_table_container);
toolbar->set_has_frame(false);
auto* process_table_view = new ProcessTableView(*cpu_graph, process_table_container);
auto* memory_stats_widget = new MemoryStatsWidget(*memory_graph, graphs_container);

View file

@ -21,7 +21,7 @@ TextEditorWidget::TextEditorWidget()
set_layout(make<GBoxLayout>(Orientation::Vertical));
layout()->set_spacing(0);
auto* toolbar = new GToolBar(this);
auto toolbar = GToolBar::construct(this);
m_editor = GTextEditor::construct(GTextEditor::MultiLine, this);
m_editor->set_ruler_visible(true);
m_editor->set_automatic_indentation_enabled(true);