Skip to content

feat(editor): show the snap target's size next to the loupe coordinates - #9

Merged
howar31 merged 2 commits into
mainfrom
feat/snap-size-label
Oct 3, 2026
Merged

howar31 merged 2 commits into
mainfrom
feat/snap-size-label

Conversation

@howar31

@howar31 howar31 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Cause

While aiming with a snap tool, the highlighted frame showed which element or window a click would take, but not its size. The width and height appeared only after a drag had started.

Change

  • lib/editor/editor_core.dart: the loupe's coordinate row gains a second pill with the snap target's width and height in native pixels, to the right of the coordinates. It shows whenever a snap frame is highlighted: the hovered element or window, or the whole display for a crop over bare desktop. It hides with the loupe's info blocks, and during a drag the existing drag readout takes over.
  • The loupe reserves the width of that row, so near the right screen edge it flips to the left of the pointer before the row would be cut.
  • test/editor/editor_core_snap_test.dart: cases for the size shown per target, the whole-display size, the row order and position, the right edge, a tool without snap, and a drag.
  • Version 1.24.0+41.

Verification

  • flutter analyze and the full flutter test suite pass on macOS.
  • Checked on screen in a macOS debug build. Not checked on screen on Windows; the change is in the shared Dart code only.

While a snap frame is highlighted, the loupe's coordinate row also shows the
target's width and height in native pixels: the hovered element or window,
or the whole display for a crop over bare desktop. The loupe flips to the
left of the pointer early enough that the row stays on screen.
@howar31
howar31 merged commit 7680563 into main Oct 3, 2026
4 checks passed
@howar31
howar31 deleted the feat/snap-size-label branch October 3, 2026 13:56

This branch was successfully deployed

1 active deployment
github-pages — 76805633 Deployed Oct 3, 2026 by howar31 via deploy #66
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.

1 participant