Spreadsheet: Use new layout system

This commit is contained in:
FrHun 2022-02-22 19:59:44 +01:00 committed by Andreas Kling
parent 39c8590720
commit 93112458b8
Notes: sideshowbarker 2024-07-17 09:51:30 +09:00
3 changed files with 8 additions and 7 deletions

View file

@ -281,7 +281,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po
auto& foreground_container = static_formatting_container.add<GUI::Widget>();
foreground_container.set_layout<GUI::HorizontalBoxLayout>();
foreground_container.layout()->set_margins({ 4, 0, 0 });
foreground_container.set_shrink_to_fit(true);
foreground_container.set_preferred_height(GUI::SpecialDimension::Fit);
auto& foreground_label = foreground_container.add<GUI::Label>();
foreground_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
@ -301,7 +301,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po
auto& background_container = static_formatting_container.add<GUI::Widget>();
background_container.set_layout<GUI::HorizontalBoxLayout>();
background_container.layout()->set_margins({ 4, 0, 0 });
background_container.set_shrink_to_fit(true);
background_container.set_preferred_height(GUI::SpecialDimension::Fit);
auto& background_label = background_container.add<GUI::Label>();
background_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);

View file

@ -11,7 +11,7 @@
}
@GUI::Widget {
shrink_to_fit: true
preferred_height: "fit"
layout: @GUI::HorizontalBoxLayout {
spacing: 10
}

View file

@ -1,8 +1,9 @@
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {}
preferred_height: "fit"
@GUI::Widget {
shrink_to_fit: true
preferred_height: "fit"
layout: @GUI::HorizontalBoxLayout {}
@GUI::Label {
@ -12,14 +13,14 @@
@GUI::TextEditor {
name: "formula_editor"
fixed_height: 25
fixed_height: 32
tooltip: "Use 'value' to refer to the current cell's value"
font_type: "FixedWidth"
}
}
@GUI::Widget {
shrink_to_fit: true
preferred_height: "fit"
layout: @GUI::HorizontalBoxLayout {}
@GUI::Label {
@ -33,7 +34,7 @@
}
@GUI::Widget {
shrink_to_fit: true
preferred_height: "fit"
layout: @GUI::HorizontalBoxLayout {}
@GUI::Label {