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

Zoombutton #1073

Closed
wants to merge 37 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
be0caf6
Adding zoom in/out buttons to toolbar.
Tiomat85 May 14, 2024
a5c13c6
Adding svg files, and fixing an issue with the glass_in having an ext…
Tiomat85 May 15, 2024
3eca6b2
Fixed zoom-by-drag scaling.
Tiomat85 May 17, 2024
45833be
Made it return True if the release is handled by the base class
Tiomat85 May 17, 2024
94b264e
Merge branch 'nion-software:master' into zoombutton
Tiomat85 Jun 19, 2024
8058d57
Update ImageCanvasItem.py
Tiomat85 Jun 19, 2024
b7c3cd3
Changed icons
Tiomat85 Jun 20, 2024
01ebe1f
Remove unused files
Tiomat85 Jun 20, 2024
623072c
Missed reference
Tiomat85 Jun 20, 2024
901fc1d
Fixes as per comments
Tiomat85 Jul 8, 2024
617ba24
Zoom Out Error
Tiomat85 Jul 8, 2024
72ed328
Types
Tiomat85 Jul 8, 2024
6495018
Updates to align with new requirements setup.
Tiomat85 Sep 16, 2024
fd5e5f4
Removing unnecessary files and whitespace
Tiomat85 Sep 17, 2024
21469fc
Merge branch 'nion-software:master' into zoombutton
Tiomat85 Sep 30, 2024
6f1a70d
Adding zoom in/out buttons to toolbar.
Tiomat85 May 14, 2024
853ac50
Adding svg files, and fixing an issue with the glass_in having an ext…
Tiomat85 May 15, 2024
7761dff
Fixed zoom-by-drag scaling.
Tiomat85 May 17, 2024
f740530
Made it return True if the release is handled by the base class
Tiomat85 May 17, 2024
64c4d88
Update ImageCanvasItem.py
Tiomat85 Jun 19, 2024
6ff51a5
Changed icons
Tiomat85 Jun 20, 2024
deef9bc
Missed reference and removed unused files
Tiomat85 Jun 20, 2024
1cd42b3
Fixes as per comments
Tiomat85 Jul 8, 2024
439c3ab
Zoom Out Error
Tiomat85 Jul 8, 2024
214b008
Types
Tiomat85 Jul 8, 2024
44c0da4
Updates to align with new requirements setup
Tiomat85 Sep 16, 2024
6955eef
Icon Update and bug fixes on Zoom Tool
Tiomat85 Sep 30, 2024
08cb7d2
Merge branch 'zoombutton' of https://github.com/Phasefocus/nionswift …
Tiomat85 Sep 30, 2024
1f02377
Removed Merge Duplicated Code
Tiomat85 Sep 30, 2024
02cd65b
Fix typing issue with inputs
Tiomat85 Sep 30, 2024
2c1da07
Fix bug that had disabled keyboard zooming
Tiomat85 Oct 1, 2024
3379976
Tidying code from review
Tiomat85 Oct 2, 2024
26fa492
Adjusting Test to check accuracy
Tiomat85 Oct 2, 2024
3dd78a5
Refactor ZoomMouseHandler
Tiomat85 Oct 3, 2024
b5f9fc1
Fixed Zoom Unit Tests
Tiomat85 Oct 3, 2024
5836671
Adding Zoom keybind 'z'
Tiomat85 Oct 3, 2024
e3248f2
Fixing mypy type verification issues and removed unused function
Tiomat85 Oct 3, 2024
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
Prev Previous commit
Next Next commit
Changed icons
Changed icons as per request, renamed the file references and files to be based around 'zoom' rather than 'magifying' as that has extra connotations.
  • Loading branch information
Tiomat85 committed Sep 30, 2024
commit 6ff51a53f0c540027beb14ab94b34398a87098df
15 changes: 15 additions & 0 deletions artwork/zoom_in.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions artwork/zoom_out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions nion/swift/DocumentController.py
Original file line number Diff line number Diff line change
@@ -3295,8 +3295,8 @@ def execute(self, context: Window.ActionContext) -> Window.ActionResult:
Window.register_action(SetToolModeAction("wedge", _("Wedge"), "wedge_icon.png", _("Wedge tool for creating wedge masks")))
Window.register_action(SetToolModeAction("ring", _("Ring"), "annular_ring.png", _("Ring tool for creating ring masks")))
Window.register_action(SetToolModeAction("lattice", _("Lattice"), "lattice_icon.png", _("Lattice tool for creating periodic lattice masks")))
Window.register_action(SetToolModeAction("zoom-in", _("Zoom In"), "mag_glass_in.png", _("Zoom in on image")))
Window.register_action(SetToolModeAction("zoom-out", _("Zoom Out"), "mag_glass_out.png", _("Zoom out on image")))
Window.register_action(SetToolModeAction("zoom-in", _("Zoom In"), "zoom_in.png", _("Zoom in on image")))
Window.register_action(SetToolModeAction("zoom-out", _("Zoom Out"), "zoom_out.png", _("Zoom out on image")))

class WorkspaceChangeSplits(Window.Action):
# this is for internal testing only. since it requires passing the splitter and splits,
Binary file added nion/swift/resources/zoom_in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nion/swift/resources/zoom_out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions nion/swift/test/ImageCanvasItem_test.py
Original file line number Diff line number Diff line change
@@ -307,9 +307,11 @@ def test_zoom_tool_on_one_image_of_multiple_displays(self):
# run test
document_controller.tool_mode = "zoom-in"
display_panel.display_canvas_item.simulate_press((100, 125))
display_panel.display_canvas_item.simulate_release((100, 125))

cmeyer marked this conversation as resolved.
Show resolved Hide resolved
document_controller.tool_mode = "zoom-out"
display_panel.display_canvas_item.simulate_press((125, 100))
display_panel.display_canvas_item.simulate_release((125, 100))

if __name__ == '__main__':
logging.getLogger().setLevel(logging.DEBUG)