summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-05 11:57:47 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-05 11:57:47 +0200
commit52de9b175376f11676e2ea2d32207332f5923069 (patch)
tree40a496b37ba6827fd5e12c77626f7e608fbc67c5 /Userland/Libraries/LibGUI
parentcbc582e0dfbbd8345342971b56362f366c65579c (diff)
downloadserenity-52de9b175376f11676e2ea2d32207332f5923069.zip
LibGUI: Do AbstractView::set_column_hidden() => set_column_visible()
This API felt backwards, so let's change it.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/AbstractTableView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/AbstractTableView.h2
-rw-r--r--Userland/Libraries/LibGUI/FilePicker.cpp10
-rw-r--r--Userland/Libraries/LibGUI/MultiView.cpp4
-rw-r--r--Userland/Libraries/LibGUI/MultiView.h2
5 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractTableView.cpp b/Userland/Libraries/LibGUI/AbstractTableView.cpp
index a3508bf7a7..8f360acbba 100644
--- a/Userland/Libraries/LibGUI/AbstractTableView.cpp
+++ b/Userland/Libraries/LibGUI/AbstractTableView.cpp
@@ -372,9 +372,9 @@ void AbstractTableView::set_default_column_width(int column, int width)
column_header().set_default_section_size(column, width);
}
-void AbstractTableView::set_column_hidden(int column, bool hidden)
+void AbstractTableView::set_column_visible(int column, bool visible)
{
- column_header().set_section_visible(column, !hidden);
+ column_header().set_section_visible(column, visible);
}
void AbstractTableView::set_column_headers_visible(bool visible)
diff --git a/Userland/Libraries/LibGUI/AbstractTableView.h b/Userland/Libraries/LibGUI/AbstractTableView.h
index 3b795112d4..fdbf682868 100644
--- a/Userland/Libraries/LibGUI/AbstractTableView.h
+++ b/Userland/Libraries/LibGUI/AbstractTableView.h
@@ -54,7 +54,7 @@ public:
bool column_headers_visible() const;
void set_column_headers_visible(bool);
- void set_column_hidden(int, bool);
+ void set_column_visible(int, bool);
int column_width(int column) const;
void set_column_width(int column, int width);
diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp
index e5f33e203c..99958bff93 100644
--- a/Userland/Libraries/LibGUI/FilePicker.cpp
+++ b/Userland/Libraries/LibGUI/FilePicker.cpp
@@ -113,11 +113,11 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& file_
m_view->set_model(SortingProxyModel::create(*m_model));
m_view->set_model_column(FileSystemModel::Column::Name);
m_view->set_key_column_and_sort_order(GUI::FileSystemModel::Column::Name, GUI::SortOrder::Ascending);
- m_view->set_column_hidden(FileSystemModel::Column::Owner, true);
- m_view->set_column_hidden(FileSystemModel::Column::Group, true);
- m_view->set_column_hidden(FileSystemModel::Column::Permissions, true);
- m_view->set_column_hidden(FileSystemModel::Column::Inode, true);
- m_view->set_column_hidden(FileSystemModel::Column::SymlinkTarget, true);
+ m_view->set_column_visible(FileSystemModel::Column::Owner, true);
+ m_view->set_column_visible(FileSystemModel::Column::Group, true);
+ m_view->set_column_visible(FileSystemModel::Column::Permissions, true);
+ m_view->set_column_visible(FileSystemModel::Column::Inode, true);
+ m_view->set_column_visible(FileSystemModel::Column::SymlinkTarget, true);
set_path(path);
diff --git a/Userland/Libraries/LibGUI/MultiView.cpp b/Userland/Libraries/LibGUI/MultiView.cpp
index 1fcff6446f..d419463f89 100644
--- a/Userland/Libraries/LibGUI/MultiView.cpp
+++ b/Userland/Libraries/LibGUI/MultiView.cpp
@@ -116,9 +116,9 @@ void MultiView::set_model_column(int column)
m_columns_view->set_model_column(column);
}
-void MultiView::set_column_hidden(int column_index, bool hidden)
+void MultiView::set_column_visible(int column_index, bool visible)
{
- m_table_view->set_column_hidden(column_index, hidden);
+ m_table_view->set_column_visible(column_index, visible);
}
void MultiView::build_actions()
diff --git a/Userland/Libraries/LibGUI/MultiView.h b/Userland/Libraries/LibGUI/MultiView.h
index 2c2406e86e..d92d326ffa 100644
--- a/Userland/Libraries/LibGUI/MultiView.h
+++ b/Userland/Libraries/LibGUI/MultiView.h
@@ -59,7 +59,7 @@ public:
int model_column() const { return m_model_column; }
void set_model_column(int);
- void set_column_hidden(int column_index, bool hidden);
+ void set_column_visible(int column_index, bool visible);
void set_key_column_and_sort_order(int column, SortOrder);