Files
David Richardson dc6bebd7eb AppKit: Add magnification support to CPScrollView and zoom controls to TextEditor
CPScrollView previously lacked magnification support, preventing document
zooming and leaving view scaling infrastructure without practical test coverage.
Additionally, views resetting to a 1.0 scale retained stale CSS transform properties,
and legacy cibs compiled via nib2cib omitted explicit magnification limits,
breaking zoom functionality in older archives.

* AppKit/CPScrollView.j:
  - Implement magnification methods and properties (`magnification`, `setMagnification:`, `setMagnification:centeredAtPoint:`, `allowsMagnification`, `minMagnification`, and `maxMagnification`) modelled on NSScrollView, with keyed archiving.
  - Scale clip view bounds and synchronize resizing document view widths.
  - Define standard Cocoa default limits (0.25 and 4.0) as named constants.
  - Implement robust decoding validation to assign default limits to unset or invalid archive values and reject non-positive magnification inputs, ensuring full compatibility with legacy cibs.

* AppKit/CPView.j:
  - Remove stale CSS scale styling when a view's scale factor returns to 1.0.

* Tests/AppKit/CPScrollViewTest.j:
  - Add comprehensive unit tests covering magnification scaling, archiving, and fallback decoding for unconfigured limits.

* Tests/Manual/TextEditor/DocumentWindowController.j:
  - Implement zoom action handlers (`zoomToLevel:`, `zoomToActualSize:`, `zoomIn:`, and `zoomOut:`) driven by menu item tag values.

* Tests/Manual/TextEditor/Resources/MainMenu.xib, MainMenu.cib:
  - Add View menu options for Actual Size, Zoom In, Zoom Out, and explicit Zoom Levels (25% to 200%).

* Tests/Manual/TextEditor/WORKLIST.md:
  - Mark zoom functionality as tested; log discovered scaling edge cases as open items.

CPScrollView and TextEditor now support robust document magnification from 25% to 200%, validating core view scaling mechanics.
2026-10-24 17:57:21 -06:00
..