]> git.tdb.fi Git - libs/gltk.git/commitdiff
Update layout when panel's geometry changes
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Nov 2012 08:22:30 +0000 (10:22 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Nov 2012 14:50:31 +0000 (16:50 +0200)
source/panel.cpp
source/panel.h

index a086a4e443f6fbebc779e570e9b29500063bbd03..7876120b2ce2e7cea30cecb52fd42aeef2b11185 100644 (file)
@@ -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)
index b1261c3b9d5fd5c96b1ba5f79db3735a841a9069..d3d1f79448d469cd720088dae7612188b20b2c0e 100644 (file)
@@ -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 &);