canvas.gui: remove canvas elements on deleting layout items.
This commit is contained in:
parent
cba00d9217
commit
55980af126
2 changed files with 8 additions and 0 deletions
|
@ -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 {},
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue