Skip to content

Commit

Permalink
Improvement/bandswidget sizewarning (#839)
Browse files Browse the repository at this point in the history
* Include an ipywidget Layout to the BandsPdosWidget to set an horizontal scroll bar
  • Loading branch information
AndresOrtegaGuerrero authored Oct 4, 2024
1 parent 73f2534 commit 9503aed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/aiidalab_qe/plugins/electronic_structure/result.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Electronic structure results view widgets"""

import ipywidgets as ipw

from aiidalab_qe.common.bandpdoswidget import BandPdosWidget
from aiidalab_qe.common.panel import ResultPanel

Expand Down Expand Up @@ -37,5 +39,6 @@ def _update_view(self):
bands_node = bands_output

_bands_dos_widget = BandPdosWidget(bands=bands_node, pdos=pdos_node)
# update the electronic structure tab

_bands_dos_widget.layout = ipw.Layout(width="1000px")
self.children = [_bands_dos_widget]
5 changes: 4 additions & 1 deletion src/aiidalab_qe/plugins/pdos/result.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""PDOS results view widgets"""

import ipywidgets as ipw

from aiidalab_qe.common.bandpdoswidget import BandPdosWidget
from aiidalab_qe.common.panel import ResultPanel

Expand All @@ -21,5 +23,6 @@ def _update_view(self):

_pdos_plot_view = BandPdosWidget(pdos=pdos_node)

# update the electronic structure tab
_pdos_plot_view.layout = ipw.Layout(width="1000px")

self.children = [_pdos_plot_view]

0 comments on commit 9503aed

Please sign in to comment.