Skip to content

Conversation

@arunjose696
Copy link
Contributor

@arunjose696 arunjose696 commented Dec 23, 2025

When a part is moved to a different monitor if the part is a control we currently reparent the part As in the this codeblock .
However Menus, unlike controls, were not reparented when their associated part was moved (e.g., dragged to a different monitor). This caused menu icons and images to render at the wrong zoom due to the old parent's DPI.

This change checks if a menu's parent has changed during rendering. If so, the menu is disposed and recreated under the correct parent, ensuring proper scaling and visual consistency across monitors.

Steps to reproduce

1)Start the runtime workspace on secondary monitor (350%)
2)Click on three dots on the right to open the menu here the icons would be rightly sized
2)Drag the Project Explorer tab to primary monitor (150%)
3)Click on three dots on the right

Before
image
After
image

Menus, unlike controls, were not reparented when their associated part
was moved (e.g., dragged to a different monitor). This caused menu icons
and images to render at the wrong zoom due to the old parent's DPI.

This change checks if a menu's parent has changed during rendering.
If so, the menu is disposed and recreated under the correct parent,
ensuring proper scaling and visual consistency across monitors.
@github-actions
Copy link
Contributor

Test Results

 3 015 files  ±0   3 015 suites  ±0   2h 28m 9s ⏱️ + 15m 18s
 8 258 tests ±0   8 010 ✅ ±0  248 💤 ±0  0 ❌ ±0 
23 598 runs  ±0  22 807 ✅ ±0  791 💤 ±0  0 ❌ ±0 

Results for commit 9d11600. ± Comparison against base commit 6d06b55.

@arunjose696 arunjose696 marked this pull request as ready for review December 24, 2025 10:42
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Tested with 350% secondary zoom and 250% primary zoom

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Icons in **Detached** Project Explorer options are bigger after DPI change

2 participants