fix(ui): pin outer width to prevent recorder window growth under fractional scaling - #60
Open
Miguel Vivar (MiguelVivar) wants to merge 1 commit into
Conversation
…tional scaling Fixes microsoft#56 On Windows with fractional display scaling (e.g. 125%), reading outer size on every resize pass and feeding it back into setSize is lossy due to DIP <-> physical pixel conversions. This causes the recorder window width to grow endlessly on every ResizeObserver callback. Pin the outer window width on the first fit call using a WeakMap, pass the pinned width to setSize, and add a 2px tolerance threshold for height settling.
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
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.
Fixes #56
Summary
On Windows with fractional display scaling (e.g. 125%), reading outer size on every resize pass and feeding it back into setSize is lossy due to DIP <-> physical pixel conversions. This causes the recorder window width to grow endlessly on every ResizeObserver callback.
Solution
ecorder-window-sizing.test.ts for fractional display scaling.