Skip to content

Commit

Permalink
Removed tutorial section of the header
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Nov 28, 2023
1 parent cdd5f1d commit 77c28c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/brainglobe_registration/registration_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ def __init__(self, napari_viewer: Viewer):
self._moving_image = None

self.setLayout(QVBoxLayout())
self.layout().addWidget(
header_widget(tutorial_file_name="register-2D-image.html")
)
self.layout().addWidget(header_widget())

self.main_tabs = QTabWidget(parent=self)
self.main_tabs.setTabPosition(QTabWidget.West)
Expand Down
11 changes: 4 additions & 7 deletions src/brainglobe_registration/utils/brainglobe_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
"""


def _docs_links_widget(tutorial_file_name: str, parent: QWidget = None):
_docs_links_html = f"""
def _docs_links_widget(parent: QWidget = None):
_docs_links_html = """
<h3>
<p><a href="https://brainglobe.info" style="color:gray;">Website</a></p>
<p><a href="https://brainglobe.info/tutorials/{tutorial_file_name}" style="color:gray;">Tutorial</a></p>
<p><a href="https://github.com/brainglobe/brainglobe-registration" style="color:gray;">Source</a></p>
</h3>
""" # noqa: E501
Expand All @@ -35,7 +34,7 @@ def _logo_widget(parent: QWidget = None):
return QLabel(_logo_html, parent=None)


def header_widget(tutorial_file_name: str, parent: QWidget = None):
def header_widget(parent: QWidget = None):
box = QGroupBox(parent)
box.setFlat(True)
box.setLayout(QVBoxLayout())
Expand All @@ -47,8 +46,6 @@ def header_widget(tutorial_file_name: str, parent: QWidget = None):
subbox.layout().setContentsMargins(0, 0, 0, 0)
subbox.setStyleSheet("border: 0;")
subbox.layout().addWidget(_logo_widget(parent=box))
subbox.layout().addWidget(
_docs_links_widget(tutorial_file_name, parent=box)
)
subbox.layout().addWidget(_docs_links_widget(parent=box))
box.layout().addWidget(subbox)
return box

0 comments on commit 77c28c9

Please sign in to comment.