| Issue 263: | Nested layouts are unbearably slow | |
| 1 person starred this issue and may be notified of changes. | Back to list |
See:
from pymt import *
# callback for the buttons
def test_button(btn, *largs):
print 'button pressed', btn.label
# create a grid layout with 2 rows
layout = MTGridLayout(rows=1)
for x in xrange(22):
box = MTBoxLayout()
grid = MTGridLayout(cols=2, rows=2)
grid.add_widgets(MTLabel(label="foo"))
grid.add_widgets(MTLabel(label="bar"))
grid.add_widgets(MTLabel(label="baz"))
grid.add_widgets(MTLabel(label="bum"))
box.add_widget(grid)
box.add_widget(MTLabel(label="bla"))
#btn = MTToggleButton(label='label%d' % x)
#btn.connect('on_press', curry(test_button, btn))
layout.add_widget(box)
# create a list of 400x200 size, and disable scrolling on Y axis
lst = MTList(width=getWindow().width, do_y=False)
lst.add_widget(layout)
# center the list on the screen
anchor = MTAnchorLayout()
anchor.add_widget(lst)
runTouchApp(anchor)
Jun 22, 2010
Project Member
#1
thomas.h...@gmail.com
Jun 22, 2010
Actually, no. The MTList children are relative. If the list move, the children are not moved. The issue occur because on_move/on_resize are always call. I'm trying to known why.
Jun 22, 2010
Very hard to track, here is a little patch to see some things. http://paste.pocoo.org/show/228716/ Thomas, can you fix & handle layout fixes ? If not, tell us, then we can known. 8 days left before the beta
Jun 27, 2010
fixed, needs reviews
Status:
Fixed
Jul 2, 2010
(No comment was entered for this change.)
Labels:
Milestone-0.5
|