Skip to content

Commit 8e9f2dd

Browse files
remove SceneControls (#20)
* remove SceneControls * make pyside and cellier.convenience required
1 parent 6a92510 commit 8e9f2dd

3 files changed

Lines changed: 7 additions & 20 deletions

File tree

src/oz_viewer/viewer/_viewer.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
33
Rebuilt on top of :mod:`cellier.convenience`, so the same builder runs under
44
both ``gui="qt"`` (desktop / CLI) and ``gui="anywidget"`` (Jupyter / marimo).
5-
The 2D/3D toggle, appearance controls, and per-channel controls are provided by
6-
cellier's cross-toolkit ``Layout`` docks; this module only supplies the
5+
Appearance controls and per-channel controls are provided by cellier's
6+
cross-toolkit ``Layout`` docks and the 2D/3D toggle by the dims control
7+
embedded in the canvas view; this module only supplies the
78
OME-Zarr-specific geometry (see :mod:`oz_viewer.viewer._geometry`) and the
89
Qt-specific launch niceties oz-viewer cares about (theme, fsspec loop, asyncio
910
exception handling, startup perf tracing).
@@ -234,12 +235,7 @@ def build_viewer_layout(
234235
The layout spec plus the canvas view/widget (kept by the caller so it
235236
can install a paint tracker or avoid GC).
236237
"""
237-
from cellier.convenience import (
238-
AppearanceControls,
239-
ChannelControls,
240-
Layout,
241-
SceneControls,
242-
)
238+
from cellier.convenience import AppearanceControls, ChannelControls, Layout
243239
from cellier.convenience.gui import build_canvas_widget
244240

245241
canvas_view = build_canvas_widget(
@@ -250,18 +246,14 @@ def build_viewer_layout(
250246
)
251247

252248
# Left dock: per-channel controls for multichannel data, otherwise the
253-
# single-channel appearance panel. Bottom dock: 2D/3D toggle (needs >=3
254-
# spatial axes to be meaningful).
249+
# single-channel appearance panel. The 2D/3D toggle needs no dock of its
250+
# own -- cellier embeds it in the canvas view's dims control.
255251
if geometry.channel_axis is not None:
256252
left: object = ChannelControls()
257253
else:
258254
left = AppearanceControls()
259255

260-
docks: dict[str, object] = {"left_dock": left}
261-
if geometry.spatial_ndim >= 3:
262-
docks["bottom_dock"] = SceneControls()
263-
264-
layout = Layout(center=canvas_view, **docks)
256+
layout = Layout(center=canvas_view, left_dock=left)
265257
return layout, canvas_view
266258

267259

tests/test_display.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import pytest
1313

14-
pytest.importorskip("cellier.convenience")
15-
1614

1715
def test_sidecar_options_false_returns_none():
1816
from oz_viewer.viewer._utils import _sidecar_options

tests/test_orthoviewer.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
import pytest
1616

17-
pytest.importorskip("PySide6")
18-
pytest.importorskip("cellier.convenience")
19-
2017

2118
@pytest.fixture(scope="module")
2219
def qapp():

0 commit comments

Comments
 (0)