Skip to content

Fix Popup.InheritsTransform using the X scale for the Y axis - #22457

Merged
MrJul merged 3 commits into
AvaloniaUI:mainfrom
jeff377:fix/popup-inherits-transform-scale-y
Oct 19, 2026
Merged

MrJul merged 3 commits into
AvaloniaUI:mainfrom
jeff377:fix/popup-inherits-transform-scale-y

Conversation

@jeff377

@jeff377 jeff377 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Fixes the Y scale computed by Popup when InheritsTransform is enabled.

What is the current behavior?

UpdateHostSizing computes scaleY from the first row of the transform matrix (M11/M12), the same as scaleX. A popup under ScaleTransform(1, 2) opens at 1×1, and under ScaleTransform(2, 1) it opens at 2×2. This affects ComboBox drop-downs in both Fluent and Simple themes.

What is the updated/expected behavior with this PR?

scaleY is computed from the second row (M21/M22), so each axis gets its own scale. Added a unit test that opens a popup over a placement target with ScaleTransform(1, 2) and checks the host's transform and height.

Checklist

Fixed issues

Fixes #22396

@jeff377

jeff377 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@cla-avalonia agree

@cla-avalonia

cla-avalonia commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator
  • All contributors have signed the CLA.

@jeff377

jeff377 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@cla-avalonia agree

@MrJul MrJul added bug backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Oct 15, 2026
@MrJul
MrJul enabled auto-merge October 19, 2026 08:38
@github-actions

Copy link
Copy Markdown

NuGet packages

The packages for this pull request have been published (workflow run):

@MrJul
MrJul added this pull request to the merge queue Oct 19, 2026
Merged via the queue into AvaloniaUI:main with commit b6ed89b Oct 19, 2026
10 checks passed
MrJul added a commit that referenced this pull request Nov 2, 2026
* Add failing test for Popup.InheritsTransform Y scale

* Fix Popup.InheritsTransform using the X scale for the Y axis

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Popup.InheritsTransform uses the X scale for Y too

3 participants