diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2021-03-17 20:42:34 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-18 07:49:55 +0100 |
commit | 7beae8042a829e277bdbbca6674d56705446cc8d (patch) | |
tree | 13ab456a275e62abe1cd8b720e228204f8e78c68 /Userland/Applications | |
parent | 3cc7862487d7eefe7f89d4c446c2251497575e5f (diff) | |
download | serenity-7beae8042a829e277bdbbca6674d56705446cc8d.zip |
Spreadsheet: Set default width for columns
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Spreadsheet/SpreadsheetView.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp index 1a28d81362..019b9b118a 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp @@ -169,6 +169,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet) m_sheet->add_column(); auto last_column_index = m_sheet->column_count() - 1; m_table_view->set_column_width(last_column_index, 50); + m_table_view->set_default_column_width(last_column_index, 50); m_table_view->set_column_header_alignment(last_column_index, Gfx::TextAlignment::Center); } update_with_model(); @@ -180,6 +181,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet) for (size_t i = 0; i < m_sheet->column_count(); ++i) { m_table_view->set_column_painting_delegate(i, make<TableCellPainter>(*m_table_view)); m_table_view->set_column_width(i, 50); + m_table_view->set_default_column_width(i, 50); m_table_view->set_column_header_alignment(i, Gfx::TextAlignment::Center); } |