Repository navigation
Group rulers in a single window - #224
Conversation
- Introduced GroupedRulerController to manage grouped ruler windows. - Implemented logic to toggle between grouped and separate ruler modes. - Enhanced ruler drawing to support zero ticks and improved mouse tick handling. - Added localized string for "Grouped Rulers" window title. - Updated UI components to reflect new grouped ruler features, including border views and visibility handling for unit labels and ticks.
- Introduced RulerVisibility struct to manage the visibility state of horizontal and vertical rulers. - Updated ruler display logic to utilize the new visibility management, allowing for toggling and grouping of rulers. - Enhanced GroupedRulerWindow to reflect visibility changes in the UI, including dynamic updates to border views and unit labels. - Refactored ResizeHandleView to accommodate orientation-specific adjustments for ruler handles.
- Adjusted y and x coordinate calculations for resize handles to account for horizontal and vertical offsets, background padding, and handle lengths. - Simplified control flow by consolidating placement logic for both top/bottom and left/right orientations, enhancing clarity and maintainability.
- Introduced functionality to suppress and unsuppress mouse tick drawing based on user interactions, improving UI responsiveness during ruler resizing and hovering. - Updated mouse event handling in RulerController and ResizeHandleView to manage mouse tick visibility dynamically. - Added tracking area for corner interactions in GroupedRulerContentView to enhance user experience. - Implemented snapshot tests for grouped ruler window layout to ensure visual consistency.
- Implemented multiple tests for the GroupedRulerLayout, ensuring correct frame calculations and layout behavior for different zero corners. - Added a test for the GroupedRulerContentView to verify layout and hit testing functionality. - Enhanced the GroupedRulerController to manage mouse tick visibility based on the active ruler legs. - Introduced a new snapshot image for the grouped ruler window layout to support visual regression testing. - Updated the snapshot generation script to include the GroupedRulerWindow in the compilation process.
* Refactor grouped ruler path calculations and enhance drawing logic - Consolidated the L-shaped border path logic into a reusable function for improved clarity and maintainability. - Updated the drawing methods in GroupedRulerContentView to utilize the new path function, enhancing performance and readability. - Introduced a background drawing toggle in RuleView, allowing for more flexible rendering of the horizontal and vertical rulers. - Adjusted offset calculations in HorizontalRule and VerticalRule to ensure consistent ruler rendering. * Enhance mouse tick management in ResizeHandleView - Added conditional compilation to suspend and resume mouse tick updates during resizing, improving UI responsiveness. - Updated appDelegate access to be conditional, ensuring compatibility with snapshot generation. * Update AppStoreScreenshotPreview.swift * Update AppStoreScreenshotPreview.swift * Update AppStoreScreenshotPreview.swift * Update RulerCoreTests.swift * update store screenshots * update test snapshots * Update HorizontalRule.swift
|
[codex reviewer]: Reviewed PR #224 at Findings
I didn’t run the test suite; this was a review pass from the PR diff and local source. |

Summary
Closes #219
Testing
xcodebuild -project "Free Ruler.xcodeproj" -scheme "Free Ruler" test -only-testing:FreeRulerTestsNotes