Skip to content

Commit

Permalink
improve 3D brain region view tooltip (#83)
Browse files Browse the repository at this point in the history
* improve structure view tooltip

* improve test
  • Loading branch information
alessandrofelder authored Aug 30, 2023
1 parent 63ecf2f commit 0e30dd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion brainrender_napari/brainrender_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def __init__(self, napari_viewer: Viewer):

self.structure_tree_group = QGroupBox("3D Atlas region meshes")
self.structure_tree_group.setToolTip(
"Double-click on a region to add to viewer"
"Double-click on an atlas region to add its mesh to the viewer.\n"
"Meshes will only show if the display is set to 3D.\n"
"Toggle 2D/3D display using the square/cube icon on the\n"
"lower left of the napari window."
)
self.structure_tree_group.setLayout(QVBoxLayout())
self.structure_tree_group.layout().addWidget(self.show_structure_names)
Expand Down
11 changes: 10 additions & 1 deletion tests/test_integration/test_brainrender_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,16 @@ def test_show_structures_checkbox(brainrender_widget, mocker):


def test_structure_view_tooltip(brainrender_widget):
for expected_keyword in ["double-click", "region", "viewer"]:
for expected_keyword in [
"double-click",
"atlas region",
"add",
"3d",
"mesh",
"display",
"toggle",
"viewer",
]:
assert (
expected_keyword
in brainrender_widget.structure_tree_group.toolTip().lower()
Expand Down

0 comments on commit 0e30dd4

Please sign in to comment.