summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-26 00:15:48 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-26 00:51:35 +0200
commitcfc30b11ba2910e70d4dc42cd6682854231a8a3b (patch)
tree4392ef68bb431ba9e477d0e583c342731445d09c
parent44e371635ea614e48c57e1e1f8215ca4b6228ce3 (diff)
downloadserenity-cfc30b11ba2910e70d4dc42cd6682854231a8a3b.zip
LibGUI: Rename table view's "cell painting delegate" to "column *"
What you install with this API is a delegate that manages painting of all the items in a specific column, so let's make the API reflect that.
-rw-r--r--Applications/Spreadsheet/SpreadsheetView.cpp2
-rw-r--r--Applications/SystemMonitor/ProcessMemoryMapWidget.cpp2
-rw-r--r--Applications/SystemMonitor/main.cpp2
-rw-r--r--Libraries/LibGUI/AbstractTableView.cpp2
-rw-r--r--Libraries/LibGUI/AbstractTableView.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetView.cpp b/Applications/Spreadsheet/SpreadsheetView.cpp
index b82eb1a38f..bb400567ca 100644
--- a/Applications/Spreadsheet/SpreadsheetView.cpp
+++ b/Applications/Spreadsheet/SpreadsheetView.cpp
@@ -62,7 +62,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
// FIXME: This is dumb.
for (size_t i = 0; i < m_sheet->column_count(); ++i) {
- m_table_view->set_cell_painting_delegate(i + 1, make<TableCellPainter>(*m_table_view));
+ m_table_view->set_column_painting_delegate(i + 1, make<TableCellPainter>(*m_table_view));
m_table_view->set_column_width(i + 1, 50);
m_table_view->set_column_header_alignment(i + 1, Gfx::TextAlignment::Center);
}
diff --git a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
index 9252bb7c62..2ec8f063ef 100644
--- a/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
+++ b/Applications/SystemMonitor/ProcessMemoryMapWidget.cpp
@@ -118,7 +118,7 @@ ProcessMemoryMapWidget::ProcessMemoryMapWidget()
m_json_model = GUI::JsonArrayModel::create({}, move(pid_vm_fields));
m_table_view->set_model(GUI::SortingProxyModel::create(*m_json_model));
- m_table_view->set_cell_painting_delegate(7, make<PagemapPaintingDelegate>());
+ m_table_view->set_column_painting_delegate(7, make<PagemapPaintingDelegate>());
m_table_view->set_key_column_and_sort_order(0, GUI::SortOrder::Ascending);
m_timer = add<Core::Timer>(1000, [this] { refresh(); });
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index f75a5a9d7e..a9c6771d09 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -443,7 +443,7 @@ NonnullRefPtr<GUI::Widget> build_file_systems_tab()
df_fields.empend("block_size", "Block size", Gfx::TextAlignment::CenterRight);
fs_table_view.set_model(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/df", move(df_fields))));
- fs_table_view.set_cell_painting_delegate(3, make<ProgressBarPaintingDelegate>());
+ fs_table_view.set_column_painting_delegate(3, make<ProgressBarPaintingDelegate>());
fs_table_view.model()->update();
};
diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp
index eceffc57ab..f778c17df8 100644
--- a/Libraries/LibGUI/AbstractTableView.cpp
+++ b/Libraries/LibGUI/AbstractTableView.cpp
@@ -115,7 +115,7 @@ TableCellPaintingDelegate* AbstractTableView::column_painting_delegate(int colum
return const_cast<TableCellPaintingDelegate*>(m_column_painting_delegate.get(column).value_or(nullptr));
}
-void AbstractTableView::set_cell_painting_delegate(int column, OwnPtr<TableCellPaintingDelegate> delegate)
+void AbstractTableView::set_column_painting_delegate(int column, OwnPtr<TableCellPaintingDelegate> delegate)
{
if (!delegate)
m_column_painting_delegate.remove(column);
diff --git a/Libraries/LibGUI/AbstractTableView.h b/Libraries/LibGUI/AbstractTableView.h
index aa1a20ccc2..318d56e1f3 100644
--- a/Libraries/LibGUI/AbstractTableView.h
+++ b/Libraries/LibGUI/AbstractTableView.h
@@ -57,7 +57,7 @@ public:
Gfx::TextAlignment column_header_alignment(int column) const;
void set_column_header_alignment(int column, Gfx::TextAlignment);
- void set_cell_painting_delegate(int column, OwnPtr<TableCellPaintingDelegate>);
+ void set_column_painting_delegate(int column, OwnPtr<TableCellPaintingDelegate>);
int horizontal_padding() const { return m_horizontal_padding; }