Skip to content
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

fix: min/max width/height enforcement when aspectRatio is set #37306

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Feb 16, 2023

Description of Change

Closes #37305.

Fixes an issue where minWidth/minHeight and maxWidth/maxHeight would not be enforced if the user set an aspectRatio on macOS. This was happening because we were explicitly setting the new width and height in windowWillResize, which overrides the handling macOS sets on the updated frame when setContentMinSize and setContentMaxSize were previously called on the NSWindow.

cc @carterbs

Checklist

Release Notes

Notes: Fixes an issue where minWidth/minHeight and maxWidth/maxHeight would not be enforced if the user set an aspectRatio on macOS.

@codebytere codebytere added target/23-x-y PR should also be added to the "23-x-y" branch. target/24-x-y PR should also be added to the "24-x-y" branch. labels Feb 16, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 16, 2023
@codebytere codebytere force-pushed the fix-aspect-ratio-enforcement branch 4 times, most recently from a0ad7e1 to a5c4c66 Compare February 16, 2023 14:30
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Feb 16, 2023
@codebytere codebytere marked this pull request as ready for review February 16, 2023 14:42
@codebytere codebytere added the target/22-x-y PR should also be added to the "22-x-y" branch. label Feb 16, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 17, 2023
Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me, but can we add test(s)?

@jkleinsc jkleinsc merged commit 8f2917d into main Mar 1, 2023
@jkleinsc jkleinsc deleted the fix-aspect-ratio-enforcement branch March 1, 2023 15:50
@release-clerk
Copy link

release-clerk bot commented Mar 1, 2023

Release Notes Persisted

Fixes an issue where minWidth/minHeight and maxWidth/maxHeight would not be enforced if the user set an aspectRatio on macOS.

@trop
Copy link
Contributor

trop bot commented Mar 1, 2023

I have automatically backported this PR to "24-x-y", please check out #37456

@trop trop bot added the in-flight/24-x-y label Mar 1, 2023
@trop
Copy link
Contributor

trop bot commented Mar 1, 2023

I have automatically backported this PR to "23-x-y", please check out #37457

@trop
Copy link
Contributor

trop bot commented Mar 1, 2023

I have automatically backported this PR to "22-x-y", please check out #37458

@trop trop bot added in-flight/23-x-y merged/22-x-y PR was merged to the "22-x-y" branch. merged/23-x-y PR was merged to the "23-x-y" branch. merged/24-x-y PR was merged to the "24-x-y" branch and removed target/24-x-y PR should also be added to the "24-x-y" branch. target/23-x-y PR should also be added to the "23-x-y" branch. target/22-x-y PR should also be added to the "22-x-y" branch. in-flight/22-x-y labels Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/22-x-y PR was merged to the "22-x-y" branch. merged/23-x-y PR was merged to the "23-x-y" branch. merged/24-x-y PR was merged to the "24-x-y" branch semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Aspect Ratio locking and MinHeight/Width appear incompatible
4 participants