Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeFavelier authored Feb 2, 2022
1 parent d694c74 commit 1938027
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mne/viz/backends/_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ def _layout_add_widget(self, layout, widget, stretch=0):
# Fix columns
if self._layout_max_width is not None and isinstance(widget, HBox):
children = widget.children
width = int(self._layout_max_width / len(children))
for child in children:
child.layout.width = f"{width}px"
if len(children) > 0:
width = int(self._layout_max_width / len(children))
for child in children:
child.layout.width = f"{width}px"


class _IpyDock(_AbstractDock, _IpyLayout):
Expand Down

0 comments on commit 1938027

Please sign in to comment.