Repository navigation
Conversation
The measured height was compared against a 40 limit after being scaled by the backing scale factor, so on Retina displays any real menu bar (e.g. 30pt = 60px) was rejected and replaced with 24pt. combineImages then capped the height to 24pt again. Measure and validate the height in points, take the notch safe area into account, fall back to the primary screen's menu bar height for displays without one, and draw the bar at the measured height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The generated menu bar rectangle is shorter than the actual menu bar. On my 2x display with a 30pt menu bar (60px), the tool draws a 48px bar, leaving a strip of the original wallpaper visible below it.
Cause
NSScreen.menuBarHeightmultiplied the measured height bybackingScaleFactorbefore checking it against the> 40safety limit. On Retina displays even a standard 24pt menu bar is 48px, so the real measurement was always rejected and replaced with the 24pt default. Taller menu bars (e.g. on notched MacBooks, ~37pt) were affected the most.combineImagesthen capped the drawn height to24 * NSScreen.main.backingScaleFactoragain, so even a correct measurement couldn't get through.Fix
frame.maxY - visibleFrame.maxY), also consideringsafeAreaInsets.topon macOS 12+ for notched displays.combineImagesdraws the added image at its own height, which is already sized for the target screen.Testing
Built with
swift build. On my setup (2x main display with a 30pt menu bar plus a secondary display without a menu bar) the calculated height is now 60px instead of 48px, and the secondary display uses the main screen's height.🤖 Generated with Claude Code