summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/AbstractTableView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-21 19:52:04 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-21 19:55:44 +0200
commit2adb0a07e53695e1f636384a3323aba828d48e52 (patch)
treed1affc27e33ec70daaa4d317d39ee2c6c781415b /Libraries/LibGUI/AbstractTableView.cpp
parentc666c251c89f9d63a4855494cc2cf0f92e524db0 (diff)
downloadserenity-2adb0a07e53695e1f636384a3323aba828d48e52.zip
LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizing
Auto-sizing of view columns is now enabled by default. This removes the last remaining need for ColumnMetadata, so this patch gets rid of it.
Diffstat (limited to 'Libraries/LibGUI/AbstractTableView.cpp')
-rw-r--r--Libraries/LibGUI/AbstractTableView.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp
index 094f637d01..9e8694b0ad 100644
--- a/Libraries/LibGUI/AbstractTableView.cpp
+++ b/Libraries/LibGUI/AbstractTableView.cpp
@@ -59,9 +59,6 @@ void AbstractTableView::select_all()
void AbstractTableView::update_column_sizes()
{
- if (!m_size_columns_to_fit_content)
- return;
-
if (!model())
return;
@@ -249,13 +246,7 @@ int AbstractTableView::column_width(int column_index) const
{
if (!model())
return 0;
- auto& column_data = this->column_data(column_index);
- if (!column_data.has_initialized_width) {
- ASSERT(!m_size_columns_to_fit_content);
- column_data.has_initialized_width = true;
- column_data.width = model()->column_metadata(column_index).preferred_width;
- }
- return column_data.width;
+ return column_data(column_index).width;
}
void AbstractTableView::mousemove_event(MouseEvent& event)