mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Spreadsheet: Use new layout system
This commit is contained in:
parent
39c8590720
commit
93112458b8
|
@ -281,7 +281,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po
|
||||||
auto& foreground_container = static_formatting_container.add<GUI::Widget>();
|
auto& foreground_container = static_formatting_container.add<GUI::Widget>();
|
||||||
foreground_container.set_layout<GUI::HorizontalBoxLayout>();
|
foreground_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||||
foreground_container.layout()->set_margins({ 4, 0, 0 });
|
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>();
|
auto& foreground_label = foreground_container.add<GUI::Label>();
|
||||||
foreground_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
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>();
|
auto& background_container = static_formatting_container.add<GUI::Widget>();
|
||||||
background_container.set_layout<GUI::HorizontalBoxLayout>();
|
background_container.set_layout<GUI::HorizontalBoxLayout>();
|
||||||
background_container.layout()->set_margins({ 4, 0, 0 });
|
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>();
|
auto& background_label = background_container.add<GUI::Label>();
|
||||||
background_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
background_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
shrink_to_fit: true
|
preferred_height: "fit"
|
||||||
layout: @GUI::HorizontalBoxLayout {
|
layout: @GUI::HorizontalBoxLayout {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
layout: @GUI::VerticalBoxLayout {}
|
layout: @GUI::VerticalBoxLayout {}
|
||||||
|
preferred_height: "fit"
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
shrink_to_fit: true
|
preferred_height: "fit"
|
||||||
layout: @GUI::HorizontalBoxLayout {}
|
layout: @GUI::HorizontalBoxLayout {}
|
||||||
|
|
||||||
@GUI::Label {
|
@GUI::Label {
|
||||||
|
@ -12,14 +13,14 @@
|
||||||
|
|
||||||
@GUI::TextEditor {
|
@GUI::TextEditor {
|
||||||
name: "formula_editor"
|
name: "formula_editor"
|
||||||
fixed_height: 25
|
fixed_height: 32
|
||||||
tooltip: "Use 'value' to refer to the current cell's value"
|
tooltip: "Use 'value' to refer to the current cell's value"
|
||||||
font_type: "FixedWidth"
|
font_type: "FixedWidth"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
shrink_to_fit: true
|
preferred_height: "fit"
|
||||||
layout: @GUI::HorizontalBoxLayout {}
|
layout: @GUI::HorizontalBoxLayout {}
|
||||||
|
|
||||||
@GUI::Label {
|
@GUI::Label {
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
shrink_to_fit: true
|
preferred_height: "fit"
|
||||||
layout: @GUI::HorizontalBoxLayout {}
|
layout: @GUI::HorizontalBoxLayout {}
|
||||||
|
|
||||||
@GUI::Label {
|
@GUI::Label {
|
||||||
|
|
Loading…
Reference in a new issue