mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibGUI: Convert GTableView to ObjectPtr
This commit is contained in:
parent
c13b9e2214
commit
e7b55037f4
20 changed files with 27 additions and 26 deletions
|
@ -177,7 +177,7 @@ void IRCAppWindow::setup_widgets()
|
|||
|
||||
auto* horizontal_container = new GSplitter(Orientation::Horizontal, outer_container);
|
||||
|
||||
m_window_list = new GTableView(horizontal_container);
|
||||
m_window_list = GTableView::construct(horizontal_container);
|
||||
m_window_list->set_headers_visible(false);
|
||||
m_window_list->set_alternating_row_colors(false);
|
||||
m_window_list->set_size_columns_to_fit_content(true);
|
||||
|
|
|
@ -28,7 +28,7 @@ private:
|
|||
IRCWindow& create_window(void* owner, IRCWindow::Type, const String& name);
|
||||
IRCClient m_client;
|
||||
GStackWidget* m_container { nullptr };
|
||||
GTableView* m_window_list { nullptr };
|
||||
ObjectPtr<GTableView> m_window_list;
|
||||
RefPtr<GAction> m_join_action;
|
||||
RefPtr<GAction> m_part_action;
|
||||
RefPtr<GAction> m_whois_action;
|
||||
|
|
|
@ -21,7 +21,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
|
|||
// Make a container for the log buffer view + (optional) member list.
|
||||
auto* container = new GSplitter(Orientation::Horizontal, this);
|
||||
|
||||
m_table_view = new GTableView(container);
|
||||
m_table_view = GTableView::construct(container);
|
||||
m_table_view->set_size_columns_to_fit_content(true);
|
||||
m_table_view->set_headers_visible(false);
|
||||
m_table_view->set_font(Font::default_fixed_width_font());
|
||||
|
@ -32,7 +32,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
|
|||
}
|
||||
|
||||
if (m_type == Channel) {
|
||||
auto* member_view = new GTableView(container);
|
||||
auto member_view = GTableView::construct(container);
|
||||
member_view->set_headers_visible(false);
|
||||
member_view->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
member_view->set_preferred_size(100, 0);
|
||||
|
|
|
@ -46,7 +46,7 @@ private:
|
|||
void* m_owner { nullptr };
|
||||
Type m_type;
|
||||
String m_name;
|
||||
GTableView* m_table_view { nullptr };
|
||||
ObjectPtr<GTableView> m_table_view;
|
||||
ObjectPtr<GTextEditor> m_text_editor;
|
||||
RefPtr<IRCLogBuffer> m_log_buffer;
|
||||
int m_unread_count { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue