You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dispatch(widgets=EMPTY,)deflayout(*, frame, widgets, grid, fill_frame=False):
assertlen(set(len(row) forrowingrid)), 'All columns must be the same width'columns= [1for_ingrid[0]]
l=Layout(columns=columns, fill_frame=fill_frame)
frame.add_layout(l)
forrowingrid:
fori, widget_nameinenumerate(row):
ifwidget_nameisNone:
# blank space in the layoutcontinuewidgets[widget_name].name=widget_namewidget=widgets[widget_name]()
l.add_widget(widget, i)
frame.widget_by_name[widget_name] =widgetreturnl
It's a big rough still, but I stopped working on it for unrelated reasons. I hope it can give you some things to think about.
@boxed has proposed this API for creating a more declarative model for creating widgets...
I experimented a bit with how the API could be nicer... here's from the contacts example using some tri.declarative magic:
where
layout
is:It's a big rough still, but I stopped working on it for unrelated reasons. I hope it can give you some things to think about.
Originally posted by @boxed in #24 (comment)
The text was updated successfully, but these errors were encountered: