Skip to content

Commit

Permalink
Adds vertical scroll bar to the training widget (#357)
Browse files Browse the repository at this point in the history
* Add brainglobe-napari-io to dependencies

* Add vertical scroll bar to training widget
  • Loading branch information
adamltyson authored Jan 10, 2024
1 parent ba0caf7 commit cbc0bb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cellfinder/napari/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from magicgui.widgets import FunctionGui, PushButton
from napari.qt.threading import thread_worker
from napari.utils.notifications import show_info
from qtpy.QtWidgets import QScrollArea

from cellfinder.core.train.train_yml import run as train_yml
from cellfinder.napari.utils import (
Expand Down Expand Up @@ -48,6 +49,7 @@ def training_widget() -> FunctionGui:
**MiscTrainingInputs.widget_representation(),
call_button=True,
reset_button=dict(widget_type="PushButton", text="Reset defaults"),
scrollable=True,
)
def widget(
header: dict,
Expand Down Expand Up @@ -175,4 +177,8 @@ def restore_defaults():
if value is not None:
getattr(widget, name).value = value

scroll = QScrollArea()
scroll.setWidget(widget._widget._qwidget)
widget._widget._qwidget = scroll

return widget
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
requires-python = ">=3.9"
dependencies = [
"brainglobe-utils",
"brainglobe-napari-io",
"dask[array]",
"fancylog>=0.0.7",
"natsort",
Expand Down

0 comments on commit cbc0bb6

Please sign in to comment.