mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
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.
This commit is contained in:
parent
9538c06a45
commit
74786f2d5a
2 changed files with 4 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include <LibGUI/GMenu.h>
|
#include <LibGUI/GMenu.h>
|
||||||
#include <LibGUI/GMenuBar.h>
|
#include <LibGUI/GMenuBar.h>
|
||||||
#include <LibGUI/GInputBox.h>
|
#include <LibGUI/GInputBox.h>
|
||||||
|
#include <LibGUI/GSplitter.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
IRCAppWindow::IRCAppWindow()
|
IRCAppWindow::IRCAppWindow()
|
||||||
|
@ -136,8 +137,7 @@ void IRCAppWindow::setup_widgets()
|
||||||
toolbar->add_action(*m_open_query_action);
|
toolbar->add_action(*m_open_query_action);
|
||||||
toolbar->add_action(*m_close_query_action);
|
toolbar->add_action(*m_close_query_action);
|
||||||
|
|
||||||
auto* horizontal_container = new GWidget(widget);
|
auto* horizontal_container = new GSplitter(Orientation::Horizontal, widget);
|
||||||
horizontal_container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
|
||||||
|
|
||||||
m_window_list = new GTableView(horizontal_container);
|
m_window_list = new GTableView(horizontal_container);
|
||||||
m_window_list->set_headers_visible(false);
|
m_window_list->set_headers_visible(false);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <LibGUI/GTableView.h>
|
#include <LibGUI/GTableView.h>
|
||||||
#include <LibGUI/GTextEditor.h>
|
#include <LibGUI/GTextEditor.h>
|
||||||
#include <LibGUI/GTextBox.h>
|
#include <LibGUI/GTextBox.h>
|
||||||
|
#include <LibGUI/GSplitter.h>
|
||||||
|
|
||||||
IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& name, GWidget* parent)
|
IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& name, GWidget* parent)
|
||||||
: 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));
|
set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||||
|
|
||||||
// Make a container for the log buffer view + (optional) member list.
|
// Make a container for the log buffer view + (optional) member list.
|
||||||
GWidget* container = new GWidget(this);
|
auto* container = new GSplitter(Orientation::Horizontal, this);
|
||||||
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
|
||||||
|
|
||||||
m_table_view = new GTableView(container);
|
m_table_view = new GTableView(container);
|
||||||
m_table_view->set_headers_visible(false);
|
m_table_view->set_headers_visible(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue