From 93112458b8e3628de01185239fd95ee90cc6278b Mon Sep 17 00:00:00 2001 From: FrHun <28605587+frhun@users.noreply.github.com> Date: Tue, 22 Feb 2022 19:59:44 +0100 Subject: [PATCH] Spreadsheet: Use new layout system --- Userland/Applications/Spreadsheet/CellTypeDialog.cpp | 4 ++-- Userland/Applications/Spreadsheet/CondFormatting.gml | 2 +- Userland/Applications/Spreadsheet/CondView.gml | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp index a450db4758..1d70e5eca4 100644 --- a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp +++ b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp @@ -281,7 +281,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector const& po auto& foreground_container = static_formatting_container.add(); foreground_container.set_layout(); 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(); foreground_label.set_text_alignment(Gfx::TextAlignment::CenterLeft); @@ -301,7 +301,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector const& po auto& background_container = static_formatting_container.add(); background_container.set_layout(); 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(); background_label.set_text_alignment(Gfx::TextAlignment::CenterLeft); diff --git a/Userland/Applications/Spreadsheet/CondFormatting.gml b/Userland/Applications/Spreadsheet/CondFormatting.gml index 934573a1b8..62c8a2e249 100644 --- a/Userland/Applications/Spreadsheet/CondFormatting.gml +++ b/Userland/Applications/Spreadsheet/CondFormatting.gml @@ -11,7 +11,7 @@ } @GUI::Widget { - shrink_to_fit: true + preferred_height: "fit" layout: @GUI::HorizontalBoxLayout { spacing: 10 } diff --git a/Userland/Applications/Spreadsheet/CondView.gml b/Userland/Applications/Spreadsheet/CondView.gml index f532d406dd..41a0cdcc7f 100644 --- a/Userland/Applications/Spreadsheet/CondView.gml +++ b/Userland/Applications/Spreadsheet/CondView.gml @@ -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 {