diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-15 16:44:51 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-15 16:44:51 +0100 |
commit | a3d5ba8f23a0dace613597a89f34457372cc3515 (patch) | |
tree | 57925e149643d6f1e19973115f21be154a1ad1da /LibGUI/GStackWidget.cpp | |
parent | c1f2f5a1533558bcc2eea2b10e6d7fa71ea0b3d2 (diff) | |
download | serenity-a3d5ba8f23a0dace613597a89f34457372cc3515.zip |
LibGUI: Don't autofill the background of GStackWidget.
Diffstat (limited to 'LibGUI/GStackWidget.cpp')
-rw-r--r-- | LibGUI/GStackWidget.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/LibGUI/GStackWidget.cpp b/LibGUI/GStackWidget.cpp index 964c8ced9d..fea58ab676 100644 --- a/LibGUI/GStackWidget.cpp +++ b/LibGUI/GStackWidget.cpp @@ -4,8 +4,6 @@ GStackWidget::GStackWidget(GWidget* parent) : GWidget(parent) { - set_fill_with_background_color(true); - set_background_color(Color::Red); } GStackWidget::~GStackWidget() @@ -14,7 +12,6 @@ GStackWidget::~GStackWidget() void GStackWidget::set_active_widget(GWidget* widget) { - dbgprintf("XXX: GStackWidget: set_active_widget %p\n", widget); if (widget == m_active_widget) return; @@ -40,14 +37,11 @@ void GStackWidget::child_event(GChildEvent& event) return; auto& child = static_cast<GWidget&>(*event.child()); if (event.type() == GEvent::ChildAdded) { - dbgprintf("XXX: GStackWidget: did_add_child %p\n", &child); - if (!m_active_widget) { + if (!m_active_widget) set_active_widget(&child); - } else { + else child.set_visible(false); - } } else if (event.type() == GEvent::ChildRemoved) { - dbgprintf("XXX: GStackWidget: did_remove_child %p\n", &child); if (m_active_widget == &child) { GWidget* new_active_widget = nullptr; for (auto* new_child : children()) { |