diff options
author | Karol Kosek <krkk@serenityos.org> | 2023-03-10 18:55:52 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-16 09:58:42 +0100 |
commit | 797968c310d3b13f74968ba292e0b360d6d2d9c2 (patch) | |
tree | cc1a1bc5f52a9ce43d443d5630aa0da15e4b643b /Userland/Applications/Spreadsheet | |
parent | 5fed25ca9aa014372ccfbb79accb49663fc449e2 (diff) | |
download | serenity-797968c310d3b13f74968ba292e0b360d6d2d9c2.zip |
LibGUI+Userland: Make TabWidget::*add_tab() take title using new string
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r-- | Userland/Applications/Spreadsheet/CellTypeDialog.cpp | 8 | ||||
-rw-r--r-- | Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp index 1f5979217d..90093fa841 100644 --- a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp +++ b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp @@ -132,7 +132,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po m_conditional_formats = cell.conditional_formats(); } - auto& type_tab = tabs.add_tab<GUI::Widget>("Type"); + auto& type_tab = tabs.add_tab<GUI::Widget>("Type"_short_string); type_tab.set_layout<GUI::HorizontalBoxLayout>(4); { auto& left_side = type_tab.add<GUI::Widget>(); @@ -197,7 +197,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po } } - auto& alignment_tab = tabs.add_tab<GUI::Widget>("Alignment"); + auto& alignment_tab = tabs.add_tab<GUI::Widget>("Alignment"_string.release_value_but_fixme_should_propagate_errors()); alignment_tab.set_layout<GUI::VerticalBoxLayout>(4); { // FIXME: Frame? @@ -264,7 +264,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po } } - auto& colors_tab = tabs.add_tab<GUI::Widget>("Color"); + auto& colors_tab = tabs.add_tab<GUI::Widget>("Color"_short_string); colors_tab.set_layout<GUI::VerticalBoxLayout>(4); { // Static formatting @@ -312,7 +312,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po } } - auto& conditional_fmt_tab = tabs.add_tab<GUI::Widget>("Conditional format"); + auto& conditional_fmt_tab = tabs.add_tab<GUI::Widget>("Conditional format"_string.release_value_but_fixme_should_propagate_errors()); conditional_fmt_tab.load_from_gml(cond_fmt_gml).release_value_but_fixme_should_propagate_errors(); { auto& view = *conditional_fmt_tab.find_descendant_of_type_named<Spreadsheet::ConditionsView>("conditions_view"); diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp index a34c855148..599cbd705a 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp @@ -333,7 +333,7 @@ void SpreadsheetWidget::clipboard_content_did_change(DeprecatedString const& mim void SpreadsheetWidget::setup_tabs(Vector<NonnullRefPtr<Sheet>> new_sheets) { for (auto& sheet : new_sheets) { - auto& new_view = m_tab_widget->add_tab<SpreadsheetView>(sheet->name(), sheet); + auto& new_view = m_tab_widget->add_tab<SpreadsheetView>(String::from_deprecated_string(sheet->name()).release_value_but_fixme_should_propagate_errors(), sheet); new_view.model()->on_cell_data_change = [&](auto& cell, auto& previous_data) { undo_stack().push(make<CellsUndoCommand>(cell, previous_data)); window()->set_modified(true); |