mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +00:00
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.
This commit is contained in:
parent
c666c251c8
commit
2adb0a07e5
Notes:
sideshowbarker
2024-07-19 06:16:38 +09:00
Author: https://github.com/awesomekling
Commit: 2adb0a07e5
38 changed files with 1 additions and 216 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue