Repository navigation
Fix titlebar SF Symbol raster sizing - #7074
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes #7073.
Restores the requested square raster frame for AppKit-backed SF Symbols. The regression came from the
CmuxSystemSymbolImagemigration ind4342fbaec/ #6728: titlebar callers still requested the same 12pt icon size, butRenderableSystemSymbol.configuredAppKitImageaspect-fit the configured AppKit image so non-square symbols rendered with a smaller intrinsic image inside the unchanged titlebar chrome.Reproduction / confirmation
Confirmed from code and history rather than launching local builds, per the no-build/no-local-test constraint:
v0.64.17rendered top-left titlebar symbols withImage(systemName: ...).symbolRenderingMode(.monochrome).cmuxSymbolRasterSize(config.iconSize, weight: ...).cmuxSymbolRasterSizeapplied a system font at the requested point size and a fixed square frame.mainusesCmuxSystemSymbolImage(systemName: ..., pointSize: config.iconSize, weight: ...).NSImage.sizethroughfittedSymbolSize(..., maximumDimension: rasterSize), shrinking the intrinsic image for non-square symbols while the titlebar button/frame metrics stayed unchanged.Observed from the code path: requested titlebar metrics remained 20pt buttons / 12pt icons, but the rendered image size was reduced for non-square symbols. Expected: AppKit-backed symbol rendering should preserve the requested square raster frame so the visible chrome matches the pre-regression sizing behavior.
Fix boundary
The fix belongs in
RenderableSystemSymbol, not the titlebar callsite. The titlebar already passes the correct metric; the abstraction changed the meaning ofpointSizewhen it aspect-fit the configured AppKit image. Keeping the AppKit image creation/cache preserves the macOS 27 crash fix, while removing the extra shrink restores the oldcmuxSymbolRasterSizesizing contract for all callers that ask for a concrete symbol point size. Global font magnification remains opt-in through the existingappliesGlobalFontMagnificationpath.Tests
RenderableSystemSymbolTeststhat a non-square AppKit symbol keeps the requested square raster frame.Localization
No user-facing strings changed, so no localization catalog updates were needed.
Summary by cubic
Fix titlebar SF Symbol sizing by removing extra aspect-fit scaling for AppKit images so non-square symbols render at their configured size and aspect ratio, restoring the pre-migration look. Closes #7073.
Written for commit 2dac51a. Summary will update on new commits.