Skip to content

Refactor mouse location handling in ruler classes#264

Merged
pascalpp merged 1 commit into
pascal/228-feature-multiple-rulersfrom
codex/263-mousetick-cursor-alignment
Jun 23, 2026
Merged

Refactor mouse location handling in ruler classes#264
pascalpp merged 1 commit into
pascal/228-feature-multiple-rulersfrom
codex/263-mousetick-cursor-alignment

Conversation

@pascalpp

@pascalpp pascalpp commented Jun 20, 2026

Copy link
Copy Markdown
Owner
  • Simplified mouse location updates in AppDelegate by removing unnecessary rounding.
  • Introduced dedicated methods in HorizontalRule and VerticalRule for rounding mouse coordinates, enhancing code clarity and maintainability.
  • Added unit tests to verify the rounding functionality for mouse coordinates in ruler classes.

Fixes #263

* Simplified mouse location updates in AppDelegate by removing unnecessary rounding.
* Introduced dedicated methods in HorizontalRule and VerticalRule for rounding mouse coordinates, enhancing code clarity and maintainability.
* Added unit tests to verify the rounding functionality for mouse coordinates in ruler classes.
@pascalpp pascalpp marked this pull request as ready for review June 20, 2026 03:40

Copy link
Copy Markdown
Owner Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pascalpp pascalpp left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[codex reviewer] Reviewed the diff and did not find any blocking issues. Moving rounding from AppDelegate into the local horizontal/vertical rule coordinate paths keeps the live mouse tick aligned after view conversion, and the added boundary assertions cover the new helpers.

I also ran:

xcodebuild -project "Free Ruler.xcodeproj" -scheme "Free Ruler" test -only-testing:FreeRulerTests -derivedDataPath build/DerivedData

Result: passed.

@pascalpp pascalpp merged commit 5441437 into pascal/228-feature-multiple-rulers Jun 23, 2026
@pascalpp pascalpp deleted the codex/263-mousetick-cursor-alignment branch June 23, 2026 03:30
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