Support to add empty widget to HContainer and VContainer
The standard container supports adding None as widget so its derivatives should also. issue7508 review48481002
This commit is contained in:
1 parent
cab61b5e8f
commit
e698eb0cae
1 file changed
+4
@@ -135,6 +135,8 @@ class VContainer(Container):
|
||||
pass
|
||||
|
||||
def add(self, widget, attributes):
|
||||
if not widget:
|
||||
return
|
||||
expand = bool(int(attributes.get('yexpand', False)))
|
||||
fill = bool(int(attributes.get('yfill', False)))
|
||||
self.table.pack_start(widget, expand=expand, fill=fill, padding=2)
|
||||
@@ -153,6 +155,8 @@ class HContainer(Container):
|
||||
pass
|
||||
|
||||
def add(self, widget, attributes):
|
||||
if not widget:
|
||||
return
|
||||
expand = bool(int(attributes.get('xexpand', True)))
|
||||
fill = bool(int(attributes.get('xfill', True)))
|
||||
self.table.pack_start(widget, expand=expand, fill=fill, padding=1)
|
||||
|
||||
Reference in new issue
Block a user