From 5093559790a7d51d288018cfffda32082faf5f27 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 27 Nov 2012 10:22:30 +0200 Subject: [PATCH] Update layout when panel's geometry changes --- source/panel.cpp | 6 ++++++ source/panel.h | 1 + 2 files changed, 7 insertions(+) diff --git a/source/panel.cpp b/source/panel.cpp index a086a4e..7876120 100644 --- a/source/panel.cpp +++ b/source/panel.cpp @@ -151,6 +151,12 @@ void Panel::focus_out() Widget::focus_out(); } +void Panel::on_geometry_change() +{ + if(layout) + layout->update(); +} + void Panel::on_child_added(Widget &wdg) { if(layout) diff --git a/source/panel.h b/source/panel.h index b1261c3..d3d1f79 100644 --- a/source/panel.h +++ b/source/panel.h @@ -83,6 +83,7 @@ public: virtual void character(wchar_t); virtual void focus_out(); protected: + virtual void on_geometry_change(); virtual void on_child_added(Widget &); virtual void on_child_removed(Widget &); -- 2.45.2