Fix traffic light centering on macOS#212471
Merged
benibenj merged 3 commits intomicrosoft:mainfrom Feb 4, 2025
Merged
Conversation
Contributor
Author
ceac772 to
09ff612
Compare
Contributor
Author
|
I made another small change to the traffic light position. In most Mac apps, the distance between the traffic lights and the window frame is the same horizontally and vertically. The positioning in this PR is based on an invisible margin around the traffic lights, shown in this image: Here are two updated screenshots of the final result (command center enabled on the left, disabled on the right): |
Contributor
Author
|
@benibenj Would it be possible to include this in one of the next releases? |
Contributor
|
I'll try and have a look at it this month. |
benibenj
approved these changes
Dec 18, 2024
aeschli
approved these changes
Dec 18, 2024
benibenj
approved these changes
Jan 7, 2025
auto-merge was automatically disabled
January 7, 2025 14:08
Pull request was closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.




Fixes #208226.
This PR makes two changes to the traffic light centering logic for macOS (see the linked issue for a screenshot of the problem):
12px. A margin of2pxis added at the top and bottom, so the total height for centering is16px.(options.height - 16) / 2is also odd. In this case, Electron rounds up the value. To make the offset look better, the value is rounded down instead.