Skip to content

Commit 15b7e55

Browse files
committed
remove SceneControls
1 parent 6a92510 commit 15b7e55

1 file changed

Lines changed: 7 additions & 15 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

0 commit comments

Comments
 (0)