1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

IRCClient: Add a toolbar with some actions.

This commit is contained in:
Andreas Kling 2019-03-15 23:24:40 +01:00
parent b54ab06595
commit 3a3aa74b2e
13 changed files with 76 additions and 17 deletions

View file

@ -15,15 +15,21 @@ GWidget::GWidget(GWidget* parent)
set_font(nullptr);
m_background_color = Color::LightGray;
m_foreground_color = Color::Black;
if (parent && parent->layout())
parent->layout()->add_widget(*this);
}
GWidget::~GWidget()
{
}
void GWidget::child_event(GChildEvent& event)
{
if (event.type() == GEvent::ChildAdded) {
if (event.child() && event.child()->is_widget() && layout())
layout()->add_widget(static_cast<GWidget&>(*event.child()));
}
return GObject::child_event(event);
}
void GWidget::set_relative_rect(const Rect& rect)
{
if (rect == m_relative_rect)