LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayout

This commit is contained in:
Andreas Kling 2020-02-06 14:44:13 +01:00
parent dccf335d5b
commit 799b0a4fa8
Notes: sideshowbarker 2024-07-19 09:34:12 +09:00
49 changed files with 114 additions and 114 deletions

View file

@ -64,7 +64,7 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_margins({ 0, 8, 0, 8 });
widget->layout()->set_spacing(8);

View file

@ -38,7 +38,7 @@
InspectorWidget::InspectorWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
auto splitter = GUI::VerticalSplitter::construct(this);
m_dom_tree_view = GUI::TreeView::construct(splitter);
m_dom_tree_view->on_selection = [this](auto& index) {

View file

@ -77,7 +77,7 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto toolbar = GUI::ToolBar::construct(widget);

View file

@ -59,7 +59,7 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
auto board_combo = GUI::ComboBox::construct(widget);
board_combo->set_only_allow_values_from_model(true);

View file

@ -100,7 +100,7 @@ void DisplayPropertiesWidget::create_resolution_list()
void DisplayPropertiesWidget::create_root_widget()
{
m_root_widget = GUI::Widget::construct();
m_root_widget->set_layout(make<GUI::VBoxLayout>());
m_root_widget->set_layout(make<GUI::VerticalBoxLayout>());
m_root_widget->set_fill_with_background_color(true);
m_root_widget->layout()->set_margins({ 4, 4, 4, 16 });
}
@ -129,7 +129,7 @@ void DisplayPropertiesWidget::create_frame()
tab_widget->add_widget("Wallpaper", background_splitter);
auto background_content = GUI::Widget::construct(background_splitter.ptr());
background_content->set_layout(make<GUI::VBoxLayout>());
background_content->set_layout(make<GUI::VerticalBoxLayout>());
background_content->layout()->set_margins({ 4, 4, 4, 4 });
m_wallpaper_preview = GUI::Label::construct(background_splitter);
@ -159,7 +159,7 @@ void DisplayPropertiesWidget::create_frame()
tab_widget->add_widget("Settings", settings_splitter);
auto settings_content = GUI::Widget::construct(settings_splitter.ptr());
settings_content->set_layout(make<GUI::VBoxLayout>());
settings_content->set_layout(make<GUI::VerticalBoxLayout>());
settings_content->layout()->set_margins({ 4, 4, 4, 4 });
auto resolution_list = GUI::ListView::construct(settings_content);
@ -181,7 +181,7 @@ void DisplayPropertiesWidget::create_frame()
// Add the apply and cancel buttons
auto bottom_widget = GUI::Widget::construct(m_root_widget.ptr());
bottom_widget->set_layout(make<GUI::HBoxLayout>());
bottom_widget->set_layout(make<GUI::HorizontalBoxLayout>());
bottom_widget->layout()->add_spacer();
bottom_widget->set_size_policy(Orientation::Vertical, GUI::SizePolicy::Fixed);
bottom_widget->set_preferred_size(1, 22);

View file

@ -44,7 +44,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
ASSERT(file_path.is_valid());
auto main_widget = GUI::Widget::construct();
main_widget->set_layout(make<GUI::VBoxLayout>());
main_widget->set_layout(make<GUI::VerticalBoxLayout>());
main_widget->layout()->set_margins({ 4, 4, 4, 4 });
main_widget->set_fill_with_background_color(true);
@ -55,7 +55,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
auto tab_widget = GUI::TabWidget::construct(main_widget);
auto general_tab = GUI::Widget::construct(tab_widget.ptr());
general_tab->set_layout(make<GUI::VBoxLayout>());
general_tab->set_layout(make<GUI::VerticalBoxLayout>());
general_tab->layout()->set_margins({ 12, 8, 12, 8 });
general_tab->layout()->set_spacing(10);
tab_widget->add_widget("General", general_tab);
@ -63,7 +63,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
general_tab->layout()->add_spacer();
auto file_container = GUI::Widget::construct(general_tab.ptr());
file_container->set_layout(make<GUI::HBoxLayout>());
file_container->set_layout(make<GUI::HorizontalBoxLayout>());
file_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
file_container->layout()->set_spacing(20);
file_container->set_preferred_size(0, 34);
@ -133,7 +133,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
general_tab->layout()->add_spacer();
auto button_widget = GUI::Widget::construct(main_widget.ptr());
button_widget->set_layout(make<GUI::HBoxLayout>());
button_widget->set_layout(make<GUI::HorizontalBoxLayout>());
button_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
button_widget->set_preferred_size(0, 24);
button_widget->layout()->set_spacing(5);
@ -213,7 +213,7 @@ bool PropertiesDialog::apply_changes()
void PropertiesDialog::make_permission_checkboxes(NonnullRefPtr<GUI::Widget>& parent, PermissionMasks masks, String label_string, mode_t mode)
{
auto widget = GUI::Widget::construct(parent.ptr());
widget->set_layout(make<GUI::HBoxLayout>());
widget->set_layout(make<GUI::HorizontalBoxLayout>());
widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
widget->set_preferred_size(0, 16);
widget->layout()->set_spacing(10);
@ -242,7 +242,7 @@ void PropertiesDialog::make_property_value_pairs(const Vector<PropertyValuePair>
property_labels.ensure_capacity(pairs.size());
for (auto pair : pairs) {
auto label_container = GUI::Widget::construct(parent.ptr());
label_container->set_layout(make<GUI::HBoxLayout>());
label_container->set_layout(make<GUI::HorizontalBoxLayout>());
label_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
label_container->set_preferred_size(0, 14);
label_container->layout()->set_spacing(12);

View file

@ -90,7 +90,7 @@ int main(int argc, char** argv)
window->set_rect({ left, top, width, heigth });
auto widget = GUI::Widget::construct();
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto main_toolbar = GUI::ToolBar::construct(widget);

View file

@ -78,7 +78,7 @@ int main(int argc, char* argv[])
window->set_rect(300, 200, 570, 500);
auto widget = GUI::Widget::construct();
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto toolbar = GUI::ToolBar::construct(widget);

View file

@ -45,7 +45,7 @@
HexEditorWidget::HexEditorWidget()
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_spacing(0);
m_editor = HexEditor::construct(this);

View file

@ -181,7 +181,7 @@ void IRCAppWindow::setup_widgets()
auto widget = GUI::Widget::construct();
set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto toolbar = GUI::ToolBar::construct(widget);
@ -196,7 +196,7 @@ void IRCAppWindow::setup_widgets()
toolbar->add_action(*m_close_query_action);
auto outer_container = GUI::Widget::construct(widget.ptr());
outer_container->set_layout(make<GUI::VBoxLayout>());
outer_container->set_layout(make<GUI::VerticalBoxLayout>());
outer_container->layout()->set_margins({ 2, 0, 2, 2 });
auto horizontal_container = GUI::HorizontalSplitter::construct(outer_container);

View file

@ -42,7 +42,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
, m_type(type)
, m_name(name)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
// Make a container for the log buffer view + (optional) member list.
auto container = GUI::HorizontalSplitter::construct(this);

View file

@ -111,15 +111,15 @@ PaletteWidget::PaletteWidget(PaintableWidget& paintable_widget, GUI::Widget* par
auto color_container = GUI::Widget::construct(this);
color_container->set_relative_rect(m_secondary_color_widget->relative_rect().right() + 2, 2, 500, 32);
color_container->set_layout(make<GUI::VBoxLayout>());
color_container->set_layout(make<GUI::VerticalBoxLayout>());
color_container->layout()->set_spacing(1);
auto top_color_container = GUI::Widget::construct(color_container.ptr());
top_color_container->set_layout(make<GUI::HBoxLayout>());
top_color_container->set_layout(make<GUI::HorizontalBoxLayout>());
top_color_container->layout()->set_spacing(1);
auto bottom_color_container = GUI::Widget::construct(color_container.ptr());
bottom_color_container->set_layout(make<GUI::HBoxLayout>());
bottom_color_container->set_layout(make<GUI::HorizontalBoxLayout>());
bottom_color_container->layout()->set_spacing(1);
auto add_color_widget = [&](GUI::Widget* container, Color color) {

View file

@ -72,7 +72,7 @@ ToolboxWidget::ToolboxWidget(GUI::Widget* parent)
set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
set_preferred_size(48, 0);
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
auto add_tool = [&](const StringView& name, const StringView& icon_name, OwnPtr<Tool>&& tool) {

View file

@ -59,13 +59,13 @@ int main(int argc, char** argv)
auto horizontal_container = GUI::Widget::construct();
window->set_main_widget(horizontal_container);
horizontal_container->set_layout(make<GUI::HBoxLayout>());
horizontal_container->set_layout(make<GUI::HorizontalBoxLayout>());
horizontal_container->layout()->set_spacing(0);
new ToolboxWidget(horizontal_container);
auto vertical_container = GUI::Widget::construct(horizontal_container.ptr());
vertical_container->set_layout(make<GUI::VBoxLayout>());
vertical_container->set_layout(make<GUI::VerticalBoxLayout>());
vertical_container->layout()->set_spacing(0);
auto paintable_widget = PaintableWidget::construct(vertical_container);

View file

@ -40,11 +40,11 @@ KnobsWidget::KnobsWidget(GUI::Widget* parent, AudioEngine& audio_engine, MainWid
set_frame_thickness(2);
set_frame_shadow(Gfx::FrameShadow::Sunken);
set_frame_shape(Gfx::FrameShape::Container);
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
set_fill_with_background_color(true);
m_labels_container = GUI::Widget::construct(this);
m_labels_container->set_layout(make<GUI::HBoxLayout>());
m_labels_container->set_layout(make<GUI::HorizontalBoxLayout>());
m_labels_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_labels_container->set_preferred_size(0, 20);
@ -57,7 +57,7 @@ KnobsWidget::KnobsWidget(GUI::Widget* parent, AudioEngine& audio_engine, MainWid
m_delay_label = GUI::Label::construct("Delay", m_labels_container);
m_values_container = GUI::Widget::construct(this);
m_values_container->set_layout(make<GUI::HBoxLayout>());
m_values_container->set_layout(make<GUI::HorizontalBoxLayout>());
m_values_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_values_container->set_preferred_size(0, 10);
@ -70,7 +70,7 @@ KnobsWidget::KnobsWidget(GUI::Widget* parent, AudioEngine& audio_engine, MainWid
m_delay_value = GUI::Label::construct(String::number(m_audio_engine.delay() / m_audio_engine.tick()), m_values_container);
m_knobs_container = GUI::Widget::construct(this);
m_knobs_container->set_layout(make<GUI::HBoxLayout>());
m_knobs_container->set_layout(make<GUI::HorizontalBoxLayout>());
// FIXME: Implement vertical flipping in GSlider, not here.

View file

@ -36,7 +36,7 @@
MainWidget::MainWidget(AudioEngine& audio_engine)
: m_audio_engine(audio_engine)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_spacing(2);
layout()->set_margins({ 2, 2, 2, 2 });
set_fill_with_background_color(true);
@ -50,7 +50,7 @@ MainWidget::MainWidget(AudioEngine& audio_engine)
m_roll_widget->set_preferred_size(0, 300);
m_keys_and_knobs_container = GUI::Widget::construct(this);
m_keys_and_knobs_container->set_layout(make<GUI::HBoxLayout>());
m_keys_and_knobs_container->set_layout(make<GUI::HorizontalBoxLayout>());
m_keys_and_knobs_container->layout()->set_spacing(2);
m_keys_and_knobs_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_keys_and_knobs_container->set_preferred_size(0, 100);

View file

@ -38,12 +38,12 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
, m_manager(connection)
{
set_fill_with_background_color(true);
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 2, 2, 2, 2 });
auto status_widget = GUI::Widget::construct(this);
status_widget->set_fill_with_background_color(true);
status_widget->set_layout(make<GUI::HBoxLayout>());
status_widget->set_layout(make<GUI::HorizontalBoxLayout>());
m_elapsed = GUI::Label::construct(status_widget);
m_elapsed->set_frame_shape(Gfx::FrameShape::Container);
@ -53,7 +53,7 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
m_elapsed->set_preferred_size(80, 0);
auto sample_widget_container = GUI::Widget::construct(status_widget.ptr());
sample_widget_container->set_layout(make<GUI::HBoxLayout>());
sample_widget_container->set_layout(make<GUI::HorizontalBoxLayout>());
sample_widget_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
m_sample_widget = SampleWidget::construct(sample_widget_container);
@ -72,7 +72,7 @@ SoundPlayerWidget::SoundPlayerWidget(GUI::Window& window, NonnullRefPtr<Audio::C
auto control_widget = GUI::Widget::construct(this);
control_widget->set_fill_with_background_color(true);
control_widget->set_layout(make<GUI::HBoxLayout>());
control_widget->set_layout(make<GUI::HorizontalBoxLayout>());
control_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
control_widget->set_preferred_size(0, 30);
control_widget->layout()->set_margins({ 10, 2, 10, 2 });

View file

@ -52,13 +52,13 @@ MemoryStatsWidget::MemoryStatsWidget(GraphWidget& graph, GUI::Widget* parent)
set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
set_preferred_size(0, 72);
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 0, 8, 0, 0 });
layout()->set_spacing(3);
auto build_widgets_for_label = [this](const String& description) -> RefPtr<GUI::Label> {
auto container = GUI::Widget::construct(this);
container->set_layout(make<GUI::HBoxLayout>());
container->set_layout(make<GUI::HorizontalBoxLayout>());
container->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
container->set_preferred_size(275, 12);
auto description_label = GUI::Label::construct(description, container);

View file

@ -34,12 +34,12 @@ NetworkStatisticsWidget::NetworkStatisticsWidget(GUI::Widget* parent)
: GUI::LazyWidget(parent)
{
on_first_show = [this](auto&) {
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
set_fill_with_background_color(true);
auto adapters_group_box = GUI::GroupBox::construct("Adapters", this);
adapters_group_box->set_layout(make<GUI::VBoxLayout>());
adapters_group_box->set_layout(make<GUI::VerticalBoxLayout>());
adapters_group_box->layout()->set_margins({ 6, 16, 6, 6 });
adapters_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
adapters_group_box->set_preferred_size(0, 120);
@ -59,7 +59,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget(GUI::Widget* parent)
m_adapter_table_view->set_model(GUI::JsonArrayModel::create("/proc/net/adapters", move(net_adapters_fields)));
auto sockets_group_box = GUI::GroupBox::construct("Sockets", this);
sockets_group_box->set_layout(make<GUI::VBoxLayout>());
sockets_group_box->set_layout(make<GUI::VerticalBoxLayout>());
sockets_group_box->layout()->set_margins({ 6, 16, 6, 6 });
sockets_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
sockets_group_box->set_preferred_size(0, 0);

View file

@ -32,7 +32,7 @@
ProcessFileDescriptorMapWidget::ProcessFileDescriptorMapWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = GUI::TableView::construct(this);
m_table_view->set_size_columns_to_fit_content(true);

View file

@ -34,7 +34,7 @@
ProcessMemoryMapWidget::ProcessMemoryMapWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = GUI::TableView::construct(this);
m_table_view->set_size_columns_to_fit_content(true);

View file

@ -32,7 +32,7 @@
ProcessStacksWidget::ProcessStacksWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
m_stacks_editor = GUI::TextEditor::construct(GUI::TextEditor::Type::MultiLine, this);
m_stacks_editor->set_readonly(true);

View file

@ -32,7 +32,7 @@
ProcessUnveiledPathsWidget::ProcessUnveiledPathsWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_margins({ 4, 4, 4, 4 });
m_table_view = GUI::TableView::construct(this);
m_table_view->set_size_columns_to_fit_content(true);

View file

@ -115,7 +115,7 @@ int main(int argc, char** argv)
auto keeper = GUI::Widget::construct();
window->set_main_widget(keeper);
keeper->set_layout(make<GUI::VBoxLayout>());
keeper->set_layout(make<GUI::VerticalBoxLayout>());
keeper->set_fill_with_background_color(true);
keeper->layout()->set_margins({ 4, 4, 4, 4 });
@ -137,7 +137,7 @@ int main(int argc, char** argv)
auto network_stats_widget = NetworkStatisticsWidget::construct(nullptr);
tabwidget->add_widget("Network", network_stats_widget);
process_table_container->set_layout(make<GUI::VBoxLayout>());
process_table_container->set_layout(make<GUI::VerticalBoxLayout>());
process_table_container->layout()->set_margins({ 4, 0, 4, 4 });
process_table_container->layout()->set_spacing(0);
@ -278,7 +278,7 @@ RefPtr<GUI::Widget> build_file_systems_tab()
auto fs_widget = GUI::LazyWidget::construct();
fs_widget->on_first_show = [](auto& self) {
self.set_layout(make<GUI::VBoxLayout>());
self.set_layout(make<GUI::VerticalBoxLayout>());
self.layout()->set_margins({ 4, 4, 4, 4 });
auto fs_table_view = GUI::TableView::construct(&self);
fs_table_view->set_size_columns_to_fit_content(true);
@ -367,7 +367,7 @@ RefPtr<GUI::Widget> build_pci_devices_tab()
auto pci_widget = GUI::LazyWidget::construct();
pci_widget->on_first_show = [](auto& self) {
self.set_layout(make<GUI::VBoxLayout>());
self.set_layout(make<GUI::VerticalBoxLayout>());
self.layout()->set_margins({ 4, 4, 4, 4 });
auto pci_table_view = GUI::TableView::construct(&self);
pci_table_view->set_size_columns_to_fit_content(true);
@ -425,7 +425,7 @@ RefPtr<GUI::Widget> build_devices_tab()
auto devices_widget = GUI::LazyWidget::construct();
devices_widget->on_first_show = [](auto& self) {
self.set_layout(make<GUI::VBoxLayout>());
self.set_layout(make<GUI::VerticalBoxLayout>());
self.layout()->set_margins({ 4, 4, 4, 4 });
auto devices_table_view = GUI::TableView::construct(&self);
@ -444,11 +444,11 @@ NonnullRefPtr<GUI::Widget> build_graphs_tab()
graphs_container->on_first_show = [](auto& self) {
self.set_fill_with_background_color(true);
self.set_background_role(ColorRole::Button);
self.set_layout(make<GUI::VBoxLayout>());
self.set_layout(make<GUI::VerticalBoxLayout>());
self.layout()->set_margins({ 4, 4, 4, 4 });
auto cpu_graph_group_box = GUI::GroupBox::construct("CPU usage", &self);
cpu_graph_group_box->set_layout(make<GUI::VBoxLayout>());
cpu_graph_group_box->set_layout(make<GUI::VerticalBoxLayout>());
cpu_graph_group_box->layout()->set_margins({ 6, 16, 6, 6 });
cpu_graph_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
cpu_graph_group_box->set_preferred_size(0, 120);
@ -465,7 +465,7 @@ NonnullRefPtr<GUI::Widget> build_graphs_tab()
};
auto memory_graph_group_box = GUI::GroupBox::construct("Memory usage", &self);
memory_graph_group_box->set_layout(make<GUI::VBoxLayout>());
memory_graph_group_box->set_layout(make<GUI::VerticalBoxLayout>());
memory_graph_group_box->layout()->set_margins({ 6, 16, 6, 6 });
memory_graph_group_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
memory_graph_group_box->set_preferred_size(0, 120);

View file

@ -48,7 +48,7 @@ TaskbarWindow::TaskbarWindow()
auto widget = GUI::Frame::construct();
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::HBoxLayout>());
widget->set_layout(make<GUI::HorizontalBoxLayout>());
widget->layout()->set_margins({ 3, 2, 3, 2 });
widget->layout()->set_spacing(3);
widget->set_frame_thickness(1);
@ -71,7 +71,7 @@ void TaskbarWindow::create_quick_launch_bar()
{
auto quick_launch_bar = GUI::Frame::construct(main_widget());
quick_launch_bar->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
quick_launch_bar->set_layout(make<GUI::HBoxLayout>());
quick_launch_bar->set_layout(make<GUI::HorizontalBoxLayout>());
quick_launch_bar->layout()->set_spacing(3);
quick_launch_bar->layout()->set_margins({ 3, 0, 3, 0 });
quick_launch_bar->set_frame_thickness(1);

View file

@ -134,11 +134,11 @@ RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
window->set_main_widget(settings);
settings->set_fill_with_background_color(true);
settings->set_background_role(ColorRole::Button);
settings->set_layout(make<GUI::VBoxLayout>());
settings->set_layout(make<GUI::VerticalBoxLayout>());
settings->layout()->set_margins({ 4, 4, 4, 4 });
auto radio_container = GUI::GroupBox::construct("Bell Mode", settings);
radio_container->set_layout(make<GUI::VBoxLayout>());
radio_container->set_layout(make<GUI::VerticalBoxLayout>());
radio_container->layout()->set_margins({ 6, 16, 6, 6 });
radio_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
radio_container->set_preferred_size(100, 70);
@ -152,7 +152,7 @@ RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
};
auto slider_container = GUI::GroupBox::construct("Background Opacity", settings);
slider_container->set_layout(make<GUI::VBoxLayout>());
slider_container->set_layout(make<GUI::VerticalBoxLayout>());
slider_container->layout()->set_margins({ 6, 16, 6, 6 });
slider_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
slider_container->set_preferred_size(100, 50);

View file

@ -44,7 +44,7 @@
TextEditorWidget::TextEditorWidget()
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
layout()->set_spacing(0);
auto toolbar = GUI::ToolBar::construct(this);
@ -70,7 +70,7 @@ TextEditorWidget::TextEditorWidget()
m_find_replace_widget->set_fill_with_background_color(true);
m_find_replace_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_find_replace_widget->set_preferred_size(0, 48);
m_find_replace_widget->set_layout(make<GUI::VBoxLayout>());
m_find_replace_widget->set_layout(make<GUI::VerticalBoxLayout>());
m_find_replace_widget->layout()->set_margins({ 2, 2, 2, 4 });
m_find_replace_widget->set_visible(false);
@ -78,14 +78,14 @@ TextEditorWidget::TextEditorWidget()
m_find_widget->set_fill_with_background_color(true);
m_find_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_find_widget->set_preferred_size(0, 22);
m_find_widget->set_layout(make<GUI::HBoxLayout>());
m_find_widget->set_layout(make<GUI::HorizontalBoxLayout>());
m_find_widget->set_visible(false);
m_replace_widget = GUI::Widget::construct(m_find_replace_widget);
m_replace_widget->set_fill_with_background_color(true);
m_replace_widget->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_replace_widget->set_preferred_size(0, 22);
m_replace_widget->set_layout(make<GUI::HBoxLayout>());
m_replace_widget->set_layout(make<GUI::HorizontalBoxLayout>());
m_replace_widget->set_visible(false);
m_find_textbox = GUI::TextBox::construct(m_find_widget);

View file

@ -98,7 +98,7 @@ int main(int argc, char** argv)
auto background = GUI::Label::construct();
window->set_main_widget(background);
background->set_fill_with_background_color(true);
background->set_layout(make<GUI::VBoxLayout>());
background->set_layout(make<GUI::VerticalBoxLayout>());
background->layout()->set_margins({ 8, 8, 8, 8 });
background->layout()->set_spacing(8);
background->set_icon(Gfx::load_png_from_memory((const u8*)&_binary_background_png_start, (size_t)&_binary_background_png_size));
@ -121,13 +121,13 @@ int main(int argc, char** argv)
//
auto main_section = GUI::Widget::construct(background.ptr());
main_section->set_layout(make<GUI::HBoxLayout>());
main_section->set_layout(make<GUI::HorizontalBoxLayout>());
main_section->layout()->set_margins({ 0, 0, 0, 0 });
main_section->layout()->set_spacing(8);
main_section->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);
auto menu = GUI::Widget::construct(main_section.ptr());
menu->set_layout(make<GUI::VBoxLayout>());
menu->set_layout(make<GUI::VerticalBoxLayout>());
menu->layout()->set_margins({ 0, 0, 0, 0 });
menu->layout()->set_spacing(8);
menu->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
@ -138,7 +138,7 @@ int main(int argc, char** argv)
for (auto& page : pages) {
auto content = GUI::Widget::construct(stack.ptr());
content->set_layout(make<GUI::VBoxLayout>());
content->set_layout(make<GUI::VerticalBoxLayout>());
content->layout()->set_margins({ 0, 0, 0, 0 });
content->layout()->set_spacing(8);
content->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fill);

View file

@ -43,7 +43,7 @@ int main(int argc, char** argv)
window->set_main_widget(main_widget);
main_widget->set_fill_with_background_color(true);
main_widget->set_background_color(Color::White);
main_widget->set_layout(make<GUI::VBoxLayout>());
main_widget->set_layout(make<GUI::VerticalBoxLayout>());
main_widget->layout()->set_margins({ 4, 4, 4, 4 });
auto label = GUI::Label::construct(main_widget);

View file

@ -51,7 +51,7 @@ int main(int argc, char** argv)
auto main_widget = GUI::Widget::construct();
window->set_main_widget(main_widget);
main_widget->set_fill_with_background_color(true);
main_widget->set_layout(make<GUI::VBoxLayout>());
main_widget->set_layout(make<GUI::VerticalBoxLayout>());
main_widget->layout()->set_margins({ 4, 4, 4, 4 });
auto checkbox1 = GUI::CheckBox::construct("GCheckBox 1", main_widget);
@ -95,7 +95,7 @@ int main(int argc, char** argv)
auto vertical_slider_container = GUI::Widget::construct(main_widget.ptr());
vertical_slider_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
vertical_slider_container->set_preferred_size(0, 100);
vertical_slider_container->set_layout(make<GUI::HBoxLayout>());
vertical_slider_container->set_layout(make<GUI::HorizontalBoxLayout>());
auto vslider1 = GUI::VerticalSlider::construct(vertical_slider_container);
(void)vslider1;
auto vslider2 = GUI::VerticalSlider::construct(vertical_slider_container);

View file

@ -36,13 +36,13 @@ extern RefPtr<EditorWrapper> g_current_editor_wrapper;
EditorWrapper::EditorWrapper(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
auto label_wrapper = GUI::Widget::construct(this);
label_wrapper->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
label_wrapper->set_preferred_size(0, 14);
label_wrapper->set_fill_with_background_color(true);
label_wrapper->set_layout(make<GUI::HBoxLayout>());
label_wrapper->set_layout(make<GUI::HorizontalBoxLayout>());
label_wrapper->layout()->set_margins({ 2, 0, 2, 0 });
m_filename_label = GUI::Label::construct("(Untitled)", label_wrapper);

View file

@ -130,7 +130,7 @@ static RefPtr<SearchResultsModel> find_in_files(const StringView& text)
FindInFilesWidget::FindInFilesWidget(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
m_textbox = GUI::TextBox::construct(this);
m_textbox->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
m_textbox->set_preferred_size(0, 20);

View file

@ -107,7 +107,7 @@ Locator::Locator(GUI::Widget* parent)
s_header_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-header.png");
}
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
set_preferred_size(0, 20);
m_textbox = LocatorTextBox::construct(this);

View file

@ -38,7 +38,7 @@ ProcessStateWidget::ProcessStateWidget(GUI::Widget* parent)
set_preferred_size(0, 20);
set_visible(false);
set_layout(make<GUI::HBoxLayout>());
set_layout(make<GUI::HorizontalBoxLayout>());
auto pid_label_label = GUI::Label::construct("Process:", this);
pid_label_label->set_font(Gfx::Font::default_bold_font());

View file

@ -169,7 +169,7 @@ void TerminalWrapper::kill_running_command()
TerminalWrapper::TerminalWrapper(GUI::Widget* parent)
: GUI::Widget(parent)
{
set_layout(make<GUI::VBoxLayout>());
set_layout(make<GUI::VerticalBoxLayout>());
RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal");
m_terminal_widget = TerminalWidget::construct(-1, false, config);

View file

@ -145,7 +145,7 @@ int main(int argc, char** argv)
g_window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
StringBuilder path;
@ -266,7 +266,7 @@ int main(int argc, char** argv)
g_right_hand_stack = GUI::StackWidget::construct(outer_splitter);
g_form_inner_container = GUI::Widget::construct(g_right_hand_stack);
g_form_inner_container->set_layout(make<GUI::HBoxLayout>());
g_form_inner_container->set_layout(make<GUI::HorizontalBoxLayout>());
auto form_widgets_toolbar = GUI::ToolBar::construct(Orientation::Vertical, 26, g_form_inner_container);
form_widgets_toolbar->set_preferred_size(38, 0);
@ -303,11 +303,11 @@ int main(int argc, char** argv)
auto form_editing_pane_container = GUI::VerticalSplitter::construct(form_editor_inner_splitter);
form_editing_pane_container->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
form_editing_pane_container->set_preferred_size(190, 0);
form_editing_pane_container->set_layout(make<GUI::VBoxLayout>());
form_editing_pane_container->set_layout(make<GUI::VerticalBoxLayout>());
auto add_properties_pane = [&](auto& text, auto pane_widget) {
auto wrapper = GUI::Widget::construct(form_editing_pane_container.ptr());
wrapper->set_layout(make<GUI::VBoxLayout>());
wrapper->set_layout(make<GUI::VerticalBoxLayout>());
auto label = GUI::Label::construct(text, wrapper);
label->set_fill_with_background_color(true);
label->set_text_alignment(Gfx::TextAlignment::CenterLeft);

View file

@ -61,7 +61,7 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
auto splitter = GUI::HorizontalSplitter::construct(widget);

View file

@ -65,7 +65,7 @@ int main(int argc, char** argv)
auto main_widget = GUI::Widget::construct();
window->set_main_widget(main_widget);
main_widget->set_fill_with_background_color(true);
main_widget->set_layout(make<GUI::VBoxLayout>());
main_widget->set_layout(make<GUI::VerticalBoxLayout>());
auto timeline_widget = ProfileTimelineWidget::construct(*profile, main_widget);

View file

@ -65,13 +65,13 @@ VBForm::VBForm(const String& name, GUI::Widget* parent)
m_context_menu->add_action(GUI::Action::create("Lay out horizontally", Gfx::Bitmap::load_from_file("/res/icons/16x16/layout-horizontally.png"), [this](auto&) {
if (auto* widget = single_selected_widget()) {
dbg() << "Giving " << *widget->gwidget() << " a horizontal box layout";
widget->gwidget()->set_layout(make<GUI::HBoxLayout>());
widget->gwidget()->set_layout(make<GUI::HorizontalBoxLayout>());
}
}));
m_context_menu->add_action(GUI::Action::create("Lay out vertically", Gfx::Bitmap::load_from_file("/res/icons/16x16/layout-vertically.png"), [this](auto&) {
if (auto* widget = single_selected_widget()) {
dbg() << "Giving " << *widget->gwidget() << " a vertical box layout";
widget->gwidget()->set_layout(make<GUI::VBoxLayout>());
widget->gwidget()->set_layout(make<GUI::VerticalBoxLayout>());
}
}));
m_context_menu->add_separator();

View file

@ -83,7 +83,7 @@ VBPropertiesWindow::VBPropertiesWindow()
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_margins({ 2, 2, 2, 2 });
set_main_widget(widget);

View file

@ -107,7 +107,7 @@ RefPtr<GUI::Window> make_toolbox_window()
auto widget = GUI::Widget::construct();
widget->set_fill_with_background_color(true);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
window->set_main_widget(widget);

View file

@ -59,14 +59,14 @@ int main(int argc, char** argv)
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
widget->set_layout(make<GUI::VBoxLayout>());
widget->set_layout(make<GUI::VerticalBoxLayout>());
widget->layout()->set_spacing(0);
auto container = GUI::Widget::construct(widget.ptr());
container->set_fill_with_background_color(true);
container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
container->set_preferred_size(0, 36);
container->set_layout(make<GUI::HBoxLayout>());
container->set_layout(make<GUI::HorizontalBoxLayout>());
auto flag_icon_label = GUI::Label::construct(container);
flag_icon_label->set_icon(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/flag.png"));
auto flag_label = GUI::Label::construct(container);

View file

@ -44,12 +44,12 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
auto widget = Widget::construct();
set_main_widget(widget);
widget->set_fill_with_background_color(true);
widget->set_layout(make<HBoxLayout>());
widget->set_layout(make<HorizontalBoxLayout>());
auto left_container = Widget::construct(widget.ptr());
left_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
left_container->set_preferred_size(48, 0);
left_container->set_layout(make<VBoxLayout>());
left_container->set_layout(make<VerticalBoxLayout>());
auto icon_label = Label::construct(left_container);
icon_label->set_icon(m_icon);
icon_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
@ -57,7 +57,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
left_container->layout()->add_spacer();
auto right_container = Widget::construct(widget.ptr());
right_container->set_layout(make<VBoxLayout>());
right_container->set_layout(make<VerticalBoxLayout>());
right_container->layout()->set_margins({ 0, 4, 4, 4 });
auto make_label = [&](const StringView& text, bool bold = false) {
@ -77,7 +77,7 @@ AboutDialog::AboutDialog(const StringView& name, const Gfx::Bitmap* icon, Core::
auto button_container = Widget::construct(right_container.ptr());
button_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container->set_preferred_size(0, 20);
button_container->set_layout(make<HBoxLayout>());
button_container->set_layout(make<HorizontalBoxLayout>());
button_container->layout()->add_spacer();
auto ok_button = Button::construct("OK", button_container);
ok_button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);

View file

@ -44,22 +44,22 @@ private:
Orientation m_orientation;
};
class VBoxLayout final : public BoxLayout {
class VerticalBoxLayout final : public BoxLayout {
public:
explicit VBoxLayout()
explicit VerticalBoxLayout()
: BoxLayout(Orientation::Vertical)
{
}
virtual ~VBoxLayout() override {}
virtual ~VerticalBoxLayout() override {}
};
class HBoxLayout final : public BoxLayout {
class HorizontalBoxLayout final : public BoxLayout {
public:
explicit HBoxLayout()
explicit HorizontalBoxLayout()
: BoxLayout(Orientation::Horizontal)
{
}
virtual ~HBoxLayout() override {}
virtual ~HorizontalBoxLayout() override {}
};
}

View file

@ -49,15 +49,15 @@ void ColorPicker::build()
{
auto horizontal_container = Widget::construct();
horizontal_container->set_fill_with_background_color(true);
horizontal_container->set_layout(make<HBoxLayout>());
horizontal_container->set_layout(make<HorizontalBoxLayout>());
horizontal_container->layout()->set_margins({ 4, 4, 4, 4 });
set_main_widget(horizontal_container);
auto left_vertical_container = Widget::construct(horizontal_container.ptr());
left_vertical_container->set_layout(make<VBoxLayout>());
left_vertical_container->set_layout(make<VerticalBoxLayout>());
auto right_vertical_container = Widget::construct(horizontal_container.ptr());
right_vertical_container->set_layout(make<VBoxLayout>());
right_vertical_container->set_layout(make<VerticalBoxLayout>());
enum RGBComponent {
Red,

View file

@ -82,16 +82,16 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
set_rect(200, 200, 700, 400);
auto horizontal_container = Widget::construct();
set_main_widget(horizontal_container);
horizontal_container->set_layout(make<HBoxLayout>());
horizontal_container->set_layout(make<HorizontalBoxLayout>());
horizontal_container->layout()->set_margins({ 4, 4, 4, 4 });
horizontal_container->set_fill_with_background_color(true);
auto vertical_container = Widget::construct(horizontal_container.ptr());
vertical_container->set_layout(make<VBoxLayout>());
vertical_container->set_layout(make<VerticalBoxLayout>());
vertical_container->layout()->set_spacing(4);
auto upper_container = Widget::construct(vertical_container.ptr());
upper_container->set_layout(make<HBoxLayout>());
upper_container->set_layout(make<HorizontalBoxLayout>());
upper_container->layout()->set_spacing(4);
upper_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
upper_container->set_preferred_size(0, 26);
@ -149,7 +149,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
toolbar->add_action(*mkdir_action);
auto lower_container = Widget::construct(vertical_container.ptr());
lower_container->set_layout(make<VBoxLayout>());
lower_container->set_layout(make<VerticalBoxLayout>());
lower_container->layout()->set_spacing(4);
lower_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
lower_container->set_preferred_size(0, 60);
@ -157,7 +157,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
auto filename_container = Widget::construct(lower_container.ptr());
filename_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
filename_container->set_preferred_size(0, 20);
filename_container->set_layout(make<HBoxLayout>());
filename_container->set_layout(make<HorizontalBoxLayout>());
auto filename_label = Label::construct("File name:", filename_container);
filename_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
filename_label->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
@ -188,7 +188,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
auto button_container = Widget::construct(lower_container.ptr());
button_container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container->set_preferred_size(0, 20);
button_container->set_layout(make<HBoxLayout>());
button_container->set_layout(make<HorizontalBoxLayout>());
button_container->layout()->set_spacing(4);
button_container->layout()->add_spacer();
@ -228,7 +228,7 @@ FilePicker::FilePicker(Mode mode, const StringView& file_name, const StringView&
preview_container->set_frame_shape(Gfx::FrameShape::Container);
preview_container->set_frame_shadow(Gfx::FrameShadow::Sunken);
preview_container->set_frame_thickness(2);
preview_container->set_layout(make<VBoxLayout>());
preview_container->set_layout(make<VerticalBoxLayout>());
preview_container->layout()->set_margins({ 8, 8, 8, 8 });
m_preview_image_label = Label::construct(preview_container);

View file

@ -56,7 +56,7 @@ void InputBox::build()
set_rect(x(), y(), max_width + 80, 80);
widget->set_layout(make<VBoxLayout>());
widget->set_layout(make<VerticalBoxLayout>());
widget->set_fill_with_background_color(true);
widget->layout()->set_margins({ 8, 8, 8, 8 });
@ -73,10 +73,10 @@ void InputBox::build()
auto button_container_outer = Widget::construct(widget.ptr());
button_container_outer->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button_container_outer->set_preferred_size(0, 20);
button_container_outer->set_layout(make<VBoxLayout>());
button_container_outer->set_layout(make<VerticalBoxLayout>());
auto button_container_inner = Widget::construct(button_container_outer.ptr());
button_container_inner->set_layout(make<HBoxLayout>());
button_container_inner->set_layout(make<HorizontalBoxLayout>());
button_container_inner->layout()->set_spacing(8);
m_cancel_button = Button::construct(button_container_inner);

View file

@ -84,7 +84,7 @@ void MessageBox::build()
int text_width = widget->font().width(m_text);
int icon_width = 0;
widget->set_layout(make<VBoxLayout>());
widget->set_layout(make<VerticalBoxLayout>());
widget->set_fill_with_background_color(true);
widget->layout()->set_margins({ 0, 15, 0, 15 });
@ -93,7 +93,7 @@ void MessageBox::build()
RefPtr<Widget> message_container = widget;
if (m_type != Type::None) {
message_container = Widget::construct(widget.ptr());
message_container->set_layout(make<HBoxLayout>());
message_container->set_layout(make<HorizontalBoxLayout>());
message_container->layout()->set_margins({ 8, 0, 8, 0 });
message_container->layout()->set_spacing(8);
@ -109,7 +109,7 @@ void MessageBox::build()
label->set_preferred_size(text_width, 16);
auto button_container = Widget::construct(widget.ptr());
button_container->set_layout(make<HBoxLayout>());
button_container->set_layout(make<HorizontalBoxLayout>());
button_container->layout()->set_spacing(5);
button_container->layout()->set_margins({ 15, 0, 15, 0 });

View file

@ -43,7 +43,7 @@ StatusBar::StatusBar(int label_count, Widget* parent)
{
set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
set_preferred_size(0, 20);
set_layout(make<HBoxLayout>());
set_layout(make<HorizontalBoxLayout>());
layout()->set_margins({ 2, 2, 2, 2 });
layout()->set_spacing(2);