comparison frontends/src/primitivus/xmlui.py @ 2361:5defafc8ede6

core, frontends (xmlui): new LabelContainer: LabelContainer is like a PairContainer where first widget can only be LabelWidget or EmptyWidget. This case is the most common, and allow to generate better code when label can be associated to widget (e.g. in HTML).
author Goffi <goffi@goffi.org>
date Sun, 24 Sep 2017 16:36:11 +0200
parents cba3323710f0
children 8b37a62336c3
comparison
equal deleted inserted replaced
2360:72cbb6478f97 2361:5defafc8ede6
275 def _xmluiAppend(self, widget): 275 def _xmluiAppend(self, widget):
276 if isinstance(widget, PrimitivusEmptyWidget): 276 if isinstance(widget, PrimitivusEmptyWidget):
277 # we don't want highlight on empty widgets 277 # we don't want highlight on empty widgets
278 widget = urwid.AttrMap(widget, 'default') 278 widget = urwid.AttrMap(widget, 'default')
279 self.addWidget(widget) 279 self.addWidget(widget)
280
281
282 class PrimitivusLabelContainer(PrimitivusPairsContainer, xmlui.LabelContainer):
283 pass
280 284
281 285
282 class PrimitivusTabsContainer(xmlui.TabsContainer, sat_widgets.TabsContainer): 286 class PrimitivusTabsContainer(xmlui.TabsContainer, sat_widgets.TabsContainer):
283 287
284 def __init__(self, _xmlui_parent): 288 def __init__(self, _xmlui_parent):