mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
GWidget: Add set_preferred_size(width, height) overload.
It was annoying to always write set_preferred_size({ width, height }). :^)
This commit is contained in:
parent
5b440a72f9
commit
aa2224a2f0
26 changed files with 61 additions and 60 deletions
|
@ -34,7 +34,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
|
|||
auto* member_view = new GTableView(container);
|
||||
member_view->set_headers_visible(false);
|
||||
member_view->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
member_view->set_preferred_size({ 100, 0 });
|
||||
member_view->set_preferred_size(100, 0);
|
||||
member_view->set_alternating_row_colors(false);
|
||||
member_view->set_model(channel().member_model());
|
||||
member_view->set_activates_on_selection(true);
|
||||
|
@ -42,7 +42,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
|
|||
|
||||
m_text_editor = new GTextEditor(GTextEditor::SingleLine, this);
|
||||
m_text_editor->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
m_text_editor->set_preferred_size({ 0, 19 });
|
||||
m_text_editor->set_preferred_size(0, 19);
|
||||
m_text_editor->on_return_pressed = [this] {
|
||||
if (m_type == Channel)
|
||||
m_client.handle_user_input_in_channel(m_name, m_text_editor->text());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue