Skip to content

feat: Display image and crop dimensions in toolbar#357

Merged
RobertMueller2 merged 4 commits intoSatty-org:mainfrom
prime-run:dims
Mar 28, 2026
Merged

feat: Display image and crop dimensions in toolbar#357
RobertMueller2 merged 4 commits intoSatty-org:mainfrom
prime-run:dims

Conversation

@prime-run
Copy link
Copy Markdown
Contributor

@prime-run prime-run commented Dec 16, 2025

This PR adds image and crop dimensions display to the toolbar for better visibility and fixed-size rendering.

  • Show full image dimensions in toolbar (bottom right) when crop tool is inactive
  • Display crop selection dimensions when crop tool is active

NOTE: event flow from CropTool → SketchBoard → App → StyleToolbar

251216_11h22m24s_screenshot

Update: eab8720 Adds:

  • Esc key cancels crop selection instead of killing process when crop tool is active.

@RobertMueller2
Copy link
Copy Markdown
Member

Thank you for your contribution. It might take a few days to review.

@RobertMueller2
Copy link
Copy Markdown
Member

RobertMueller2 commented Dec 29, 2025

Ok, I've had a look. Few small things I'd like to see changed within the PR:

  • I think the tooltip should say "Output dimensions (width x height)". This makes sense regardless of whether there is any crop or not.
  • When exiting the crop tool (e.g. by clicking Pointer), the displayed dimension reverts to the original image size. It should only revert if crop selection is removed entirely (esc)
  • The toolbar size can change when e.g. the displayed dimensions jump from e.g. "600x400" to "5x10" due to creating a new crop rectangle. Obviously we can't account for everything, but a minimum size of the control that accommodates XXXXxYYYY would be good. set_width_chars should be possible, I think, but haven't tried it.

Additional remarks regarding the crop tool for future discussion:

  • I'm finding it a bit counter-intuitive that there's a key to remove crop selection entirely (esc) but none to finish editing it. This may need some additional usability discussion which I'll open an issue for. (edit: Crop usability improvements after PR #357 #364)
  • Our minimum width is too narrow now, although that was true before this change and worse for the top toolbar than the bottom. I'll open an issue to adjust that as well. (edit: Adjust minimum width #365)

prime-run and others added 4 commits March 28, 2026 14:33
- Change tooltip to "output dimensions"
- Keep crop dimension when leaving crop
- simplify logic, no need to broadcast deactivation
- use Some(dimension) and None instead of (0,0) tuple for "no crop"
- set static width for UI element to 11 chars
Introduces Enter as a means to finish active editing of crop area
without discarding results

Introduces Right Click as a pendant to Escape to discard crop
altogether.
@RobertMueller2
Copy link
Copy Markdown
Member

Pushed commits:

@RobertMueller2
Copy link
Copy Markdown
Member

Should be good for merging now, thanks for the PR! ❤️

@RobertMueller2 RobertMueller2 merged commit 2fbef5b into Satty-org:main Mar 28, 2026
3 checks passed
@nickjj
Copy link
Copy Markdown

nickjj commented Mar 28, 2026

This is huge, thanks so much for putting this together and it getting merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: ability to see dimensions (size) of captured content and also while cropping

3 participants