diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-30 13:57:34 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-30 13:57:34 +0100 |
commit | 74786f2d5aef74b38140d11139c6c38cad2eae1f (patch) | |
tree | eb85e28e98a414a869ced738f791951fb332cf75 /Applications | |
parent | 9538c06a4581e22b26bdcfcc8bd0217dd373f1d0 (diff) | |
download | serenity-74786f2d5aef74b38140d11139c6c38cad2eae1f.zip |
IRCClient: Use GSplitter in the window layouts.
This really brings the UI to life in a pleasant way. It's a bit annoying
that you can't initiate a resize by clicking on the shading of a splitter
resizer that actually belongs to the neighboring GFrame, I'm not sure how
to fix that yet but I'll think of something.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/IRCClient/IRCAppWindow.cpp | 4 | ||||
-rw-r--r-- | Applications/IRCClient/IRCWindow.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp index f2befab2c3..571705d4e9 100644 --- a/Applications/IRCClient/IRCAppWindow.cpp +++ b/Applications/IRCClient/IRCAppWindow.cpp @@ -10,6 +10,7 @@ #include <LibGUI/GMenu.h> #include <LibGUI/GMenuBar.h> #include <LibGUI/GInputBox.h> +#include <LibGUI/GSplitter.h> #include <stdio.h> IRCAppWindow::IRCAppWindow() @@ -136,8 +137,7 @@ void IRCAppWindow::setup_widgets() toolbar->add_action(*m_open_query_action); toolbar->add_action(*m_close_query_action); - auto* horizontal_container = new GWidget(widget); - horizontal_container->set_layout(make<GBoxLayout>(Orientation::Horizontal)); + auto* horizontal_container = new GSplitter(Orientation::Horizontal, widget); m_window_list = new GTableView(horizontal_container); m_window_list->set_headers_visible(false); diff --git a/Applications/IRCClient/IRCWindow.cpp b/Applications/IRCClient/IRCWindow.cpp index 2c7d6cb5d1..8f10815fb2 100644 --- a/Applications/IRCClient/IRCWindow.cpp +++ b/Applications/IRCClient/IRCWindow.cpp @@ -7,6 +7,7 @@ #include <LibGUI/GTableView.h> #include <LibGUI/GTextEditor.h> #include <LibGUI/GTextBox.h> +#include <LibGUI/GSplitter.h> IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& name, GWidget* parent) : GWidget(parent) @@ -18,8 +19,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na set_layout(make<GBoxLayout>(Orientation::Vertical)); // Make a container for the log buffer view + (optional) member list. - GWidget* container = new GWidget(this); - container->set_layout(make<GBoxLayout>(Orientation::Horizontal)); + auto* container = new GSplitter(Orientation::Horizontal, this); m_table_view = new GTableView(container); m_table_view->set_headers_visible(false); |