Skip to content

Add active border drawing to RulerWindow and RulerContentView#261

Merged
pascalpp merged 1 commit into
pascal/228-feature-multiple-rulersfrom
codex/260-active-ruler-border
Jun 20, 2026
Merged

Add active border drawing to RulerWindow and RulerContentView#261
pascalpp merged 1 commit into
pascal/228-feature-multiple-rulersfrom
codex/260-active-ruler-border

Conversation

@pascalpp

@pascalpp pascalpp commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Draw a 1px inset active border around the active ruler panel using the existing L-shaped/one-wing ruler geometry.
  • Keep the active border synced as rulers are created, activated, restored, cycled, and closed.
  • Use a 25% opacity active border so it stays visually secondary to the existing 50% outer border.

Tests

  • xcodebuild -project "Free Ruler.xcodeproj" -scheme "Free Ruler" test -only-testing:FreeRulerTests
  • xcodebuild -derivedDataPath /private/tmp/freeruler-active-border-derived-data -project "Free Ruler.xcodeproj" -scheme "Free Ruler" test -only-testing:FreeRulerTests/RulerCoreTests/testRulerManagerDrawsActiveBorderOnlyOnActiveRuler
  • git diff --check

Fixes #260

pascalpp commented Jun 19, 2026

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

Copy link
Copy Markdown
Owner Author

[codex reviewer] Reviewed this against codex/251-remove-legacy-ruler-window.

No blocking findings. The active-border state is centralized in RulerManager activation/close/restore paths, old controllers have their border cleared during restore, and the paint path stays inside the existing border view. The added test covers create, active handoff, and close fallback to the remaining ruler.

Verification: xcodebuild -project "Free Ruler.xcodeproj" -scheme "Free Ruler" build CODE_SIGNING_ALLOWED=NO passes on the cumulative stack. The normal focused unit-test command could not complete locally because Xcode failed while signing the app due the nested FreeRulerTests.xctest bundle being unsigned; retrying with signing disabled launched an unsigned test host that exited before XCTest connected.

@pascalpp pascalpp marked this pull request as ready for review June 20, 2026 01:44
* Introduced `drawsActiveBorder` property to `RulerWindow` and `RulerContentView` to manage the visibility of an active border.
* Updated `RulerWindowBorderView` to draw an active border based on the new property.
* Implemented logic in `RulerManager` to ensure only the active ruler displays the active border.
* Added unit test to verify active border behavior for active and inactive rulers.
@pascalpp pascalpp changed the base branch from codex/251-remove-legacy-ruler-window to graphite-base/261 June 20, 2026 01:46
@pascalpp pascalpp force-pushed the codex/260-active-ruler-border branch from e861ccd to 5acd0f4 Compare June 20, 2026 01:46
@pascalpp pascalpp force-pushed the graphite-base/261 branch from 9e34ae9 to 3363dc3 Compare June 20, 2026 01:46
@pascalpp pascalpp changed the base branch from graphite-base/261 to pascal/228-feature-multiple-rulers June 20, 2026 01:46
@pascalpp pascalpp merged commit 438a59b into pascal/228-feature-multiple-rulers Jun 20, 2026
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