canvas.gui: Update ScrollArea for layouting system.
This commit is contained in:
parent
1db2300263
commit
f91d439ac0
1 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,12 @@ gui.widgets.ScrollArea = {
|
||||||
m._max_scroll = [0, 0];
|
m._max_scroll = [0, 0];
|
||||||
m._content_size = [0, 0];
|
m._content_size = [0, 0];
|
||||||
|
|
||||||
|
m.setMinimumSize([16, 16]);
|
||||||
|
m.setSizeHint([128, 128]);
|
||||||
|
m.setMaximumSize([m._MAX_SIZE, m._MAX_SIZE]);
|
||||||
|
|
||||||
|
m.setSetGeometryFunc(m.setGeometry);
|
||||||
|
|
||||||
if( style != nil )
|
if( style != nil )
|
||||||
{
|
{
|
||||||
m._scroll = style.createWidget(parent, "scroll-area", cfg);
|
m._scroll = style.createWidget(parent, "scroll-area", cfg);
|
||||||
|
@ -102,6 +108,12 @@ gui.widgets.ScrollArea = {
|
||||||
|
|
||||||
me.update(bb);
|
me.update(bb);
|
||||||
},
|
},
|
||||||
|
setGeometry: func(geom)
|
||||||
|
{
|
||||||
|
me.move(geom[0], geom[1]);
|
||||||
|
me.setSize([geom[2] - geom[0], geom[3] - geom[1]]);
|
||||||
|
return me;
|
||||||
|
},
|
||||||
# Update scroll bar and content area.
|
# Update scroll bar and content area.
|
||||||
#
|
#
|
||||||
# Needs to be called when the size of the content changes.
|
# Needs to be called when the size of the content changes.
|
||||||
|
|
Loading…
Add table
Reference in a new issue