Skip to content

Commit

Permalink
Tag structure manager and viewer with CSS classes for easy styling (#662
Browse files Browse the repository at this point in the history
)
  • Loading branch information
edan-bainglass authored Jan 13, 2025
1 parent 7353264 commit 0ebfa1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiidalab_widgets_base/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def __init__(

super().__init__(children=[*children, self.output], **kwargs)

self.add_class("structure-manager")

def _structure_importers(self, importers):
"""Preparing structure importers."""
if not isinstance(importers, (list, tuple)):
Expand Down
2 changes: 2 additions & 0 deletions aiidalab_widgets_base/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def __init__(
self._viewer.stage.set_parameters(mouse_preset="pymol")

view_box = ipw.VBox([self._viewer])
view_box.add_class("view-box")

configuration_tabs_map = {
"Cell": self._cell_tab(),
Expand Down Expand Up @@ -1150,6 +1151,7 @@ class StructureDataViewer(_StructureDataBaseViewer):

def __init__(self, structure=None, **kwargs):
super().__init__(**kwargs)
self.add_class("structure-viewer")
self.structure = structure

@tl.observe("supercell")
Expand Down

0 comments on commit 0ebfa1c

Please sign in to comment.