1
0
Fork 0

canvas.gui: remove canvas elements on deleting layout items.

This commit is contained in:
Thomas Geymayer 2014-06-16 21:54:26 +02:00
parent cba00d9217
commit 55980af126
2 changed files with 8 additions and 0 deletions

View file

@ -114,6 +114,11 @@ gui.Widget = {
me._view._root.addEventListener("cb." ~ type, cb);
return me;
},
onRemove: func
{
if( me._view != nil )
me._view._root.del();
},
# protected:
_MAX_SIZE: 32768, # size for "no size-limit"
_onStateChange: func {},

View file

@ -45,6 +45,9 @@ gui.widgets.ScrollArea = {
var (x,y) = arg;
me._size = [x,y];
me.update();
if( me._layout != nil )
me._layout.setGeometry(me._layout.geometry());
},
# Move the scrollbars to the coordinates x,y (or as far as possible) and
# update.