8000 Change naming of 'pan/zoom' mode to 'Move camera' to clarify functionality differences in 2D and 3D by TimMonko · Pull Request #7569 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change naming of 'pan/zoom' mode to 'Move camera' to clarify functionality differences in 2D and 3D #7569

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

Merged
merged 3 commits into from
Feb 11, 2025
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
8000
Diff view
Diff view
4 changes: 2 additions & 2 deletions napari/_qt/layer_controls/qt_image_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class QtImageControls(QtBaseImageControls):
button_grid : qtpy.QtWidgets.QGridLayout
GridLayout for the layer mode buttons
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to pan/zoom shapes layer.
Button to activate move camera mode.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to transform shapes layer.
Button to transform layer.
attenuationSlider : qtpy.QtWidgets.QSlider
Slider controlling attenuation rate for `attenuated_mip` mode.
attenuationLabel : qtpy.QtWidgets.QLabel
Expand Down
4 changes: 2 additions & 2 deletions napari/_qt/layer_controls/qt_image_controls_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class QtBaseImageControls(QtLayerControls):
button_grid : qtpy.QtWidgets.QGridLayout
GridLayout for the layer mode buttons
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to pan/zoom shapes layer.
Button to activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to transform shapes layer.
Button to transform image layer.
clim_popup : napari._qt.qt_range_slider_popup.QRangeSliderPopup
Popup widget launching the contrast range slider.
colorbarLabel : qtpy.QtWidgets.QLabel
Expand Down
8 changes: 5 additions & 3 deletions napari/_qt/layer_controls/qt_layer_controls_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class QtLayerControls(QFrame):
button_grid : qtpy.QtWidgets.QGridLayout
GridLayout for the layer mode buttons
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to pan/zoom shapes layer.
Button to activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to transform shapes layer.
Button to transform layer.
blendComboBox : qtpy.QtWidgets.QComboBox
Dropdown widget to select blending mode of layer.
layer : napari.layers.Layer
Expand Down Expand Up @@ -106,7 +106,9 @@ def __init__(self, layer: Layer) -> None:
self.MODE.PAN_ZOOM,
False,
self.PAN_ZOOM_ACTION_NAME,
extra_tooltip_text=trans._('(or hold Space)'),
extra_tooltip_text=trans._(
'\n(or hold Space)\n(hold Shift to pan in 3D)'
),
checked=True,
)
self.transform_button = self._radio_button(
Expand Down
2 changes: 1 addition & 1 deletion napari/_qt/layer_controls/qt_points_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class QtPointsControls(QtLayerControls):
outOfSliceCheckBox : qtpy.QtWidgets.QCheckBox
Checkbox to indicate whether to render out of slice.
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button for pan/zoom mode.
Button to activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to select transform mode.
select_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Expand Down
2 changes: 1 addition & 1 deletion napari/_qt/layer_controls/qt_shapes_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class QtShapesControls(QtLayerControls):
move_front_button : qtpy.QtWidgets.QtModePushButton
Button to move shape(s) to the front.
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to pan/zoom shapes layer.
Button to activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to transform shapes layer.
path_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Expand Down
2 changes: 1 addition & 1 deletion napari/_qt/layer_controls/qt_surface_controls.py
5D32
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class QtSurfaceControls(QtBaseImageControls):
button_grid : qtpy.QtWidgets.QGridLayout
GridLayout for the layer mode buttons
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to pan/zoom shapes layer.
Button to activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to transform shapes layer.

Expand Down
2 changes: 1 addition & 1 deletion napari/_qt/layer_controls/qt_tracks_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QtTracksControls(QtLayerControls):
button_group : qtpy.QtWidgets.QButtonGroup
Button group of points layer modes (ADD, PAN_ZOOM, SELECT).
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button for pan/zoom mode.
Button for activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to select transform mode.

Expand Down
2 changes: 1 addition & 1 deletion napari/_qt/layer_controls/qt_vectors_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class QtVectorsControls(QtLayerControls):
button_group : qtpy.QtWidgets.QButtonGroup
Button group of points layer modes (ADD, PAN_ZOOM, SELECT).
panzoom_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button for pan/zoom mode.
Button for activate move camera mode for layer.
transform_button : napari._qt.widgets.qt_mode_button.QtModeRadioButton
Button to select transform mode.
edge_color_label : qtpy.QtWidgets.QLabel
Expand Down
2 changes: 1 addition & 1 deletion napari/components/_viewer_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def toggle_console_visibility(viewer: Viewer):
viewer.window._qt_viewer.toggle_console_visibility()


@register_viewer_action(trans._('Press and hold for pan/zoom mode'))
@register_viewer_action(trans._('Press and hold for move camera mode'))
def hold_for_pan_zoom(viewer: ViewerModel):
selected_layer = viewer.layers.selection.active
if selected_layer is None:
Expand Down
2 changes: 1 addition & 1 deletion napari/layers/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def _mode_setter_helper(self, mode_in: Union[Mode, str]) -> StringEnum:

if mode == TRANSFORM:
self.help = trans._(
'hold <space> to pan/zoom, hold <shift> to preserve aspect ratio and rotate in 45° increments'
'hold <space> to move camera, hold <shift> to preserve aspect ratio and rotate in 45° increments'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, i can't figure out how/when to see this message! Making a note here for further investigation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to find this message either. From what I understand it should be in the bottom right for the status bar message, but seems to only ever show different tooltips (like when in Transform mode it suggests pressing hotkey to switch to Move camera mode)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I've got a lead on the culprit. will make an issue or pr once I've sorted it -- probably not till the weekend though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@psobolewskiPhD, I think it shows up when 'Show Layer Tooltips' is ticked on in the settings -- I checked for 10 seconds before leavign the lab. Sorry, sending from my phone at the moment but it popped into my head and didn't want to forget to pass it on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure layer tooltips are something different.
Try:
python examples/add_labels_with_features.py
And then hover over the labeled coins with that option ticked on or off (it's also in the View menu)

)
elif mode == PAN_ZOOM:
self.help = ''
Expand Down
2 changes: 1 addition & 1 deletion napari/layers/image/_image_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def activate_image_transform_mode(layer: Image) -> None:
layer.mode = str(Mode.TRANSFORM)


@register_image_mode_action(trans._('Pan/zoom'))
@register_image_mode_action(trans._('Move camera'))
def activate_image_pan_zoom_mode(layer: Image) -> None:
layer.mode = str(Mode.PAN_ZOOM)

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/labels/_labels_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def activate_labels_transform_mode(layer: Labels):
layer.mode = Mode.TRANSFORM


@register_label_mode_action(trans._('Pan/zoom'))
@register_label_mode_action(trans._('Move camera'))
def activate_labels_pan_zoom_mode(layer: Labels):
layer.mode = Mode.PAN_ZOOM

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/points/_points_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def activate_points_transform_mode(layer: Points) -> None:
layer.mode = Mode.TRANSFORM


@register_points_mode_action(trans._('Pan/zoom'))
@register_points_mode_action(trans._('Move camera'))
def activate_points_pan_zoom_mode(layer: Points) -> None:
layer.mode = Mode.PAN_ZOOM

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/shapes/_shapes_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def activate_shapes_transform_mode(layer: Shapes) -> None:
layer.mode = Mode.TRANSFORM


@register_shapes_mode_action(trans._('Pan/zoom'))
@register_shapes_mode_action(trans._('Move camera'))
def activate_shapes_pan_zoom_mode(layer: Shapes) -> None:
layer.mode = Mode.PAN_ZOOM

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/surface/_surface_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def activate_surface_transform_mode(layer: Surface) -> None:
layer.mode = str(Mode.TRANSFORM)


@register_surface_mode_action(trans._('Pan/zoom'))
@register_surface_mode_action(trans._('Move camera'))
def activate_surface_pan_zoom_mode(layer: Surface) -> None:
layer.mode = str(Mode.PAN_ZOOM)

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/tracks/_tracks_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def activate_tracks_transform_mode(layer: Tracks) -> None:
layer.mode = str(Mode.TRANSFORM)


@register_tracks_mode_action(trans._('Pan/zoom'))
@register_tracks_mode_action(trans._('Move camera'))
def activate_tracks_pan_zoom_mode(layer: Tracks) -> None:
layer.mode = str(Mode.PAN_ZOOM)

Expand Down
2 changes: 1 addition & 1 deletion napari/layers/vectors/_vectors_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def activate_vectors_transform_mode(layer: Vectors) -> None:
layer.mode = str(Mode.TRANSFORM)


@register_vectors_mode_action(trans._('Pan/zoom'))
@register_vectors_mode_action(trans._('Move camera'))
def activate_vectors_pan_zoom_mode(layer: Vectors) -> None:
layer.mode = str(Mode.PAN_ZOOM)

Expand Down
Loading
0