Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds vertical scroll bar to the training widget #357

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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