-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(macos): support to change tray icon aspect ratio, close #564 #565
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just remove the hard-coded values and use the passed image height and width directly without modifications to match other platforms.
Will there be a breaking change if we use the icon width and height directly? |
No, since other platforms already have this behavior. We just need to confirm that the |
maybe try keeping the height fixed to 18.0 and calculate the width dynamically based on ratio of the original height to the fixed height so it would be something like this let height = 18.0;
let width = icon.width / (icon.height / height); This way it will keep the original behavior and allow you to specify a different width for your icon. So if you have an icon that is 32Hx120W, you get a 18Hx67W in tray |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information