Skip to content

Fix ContextMenu border clipping on fractional DPI displays#111

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-context-menu-border-issue
Draft

Fix ContextMenu border clipping on fractional DPI displays#111
Copilot wants to merge 2 commits intomainfrom
copilot/fix-context-menu-border-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

At fractional display scaling (e.g. 150%), the device→logical pixel conversion in MenuDropDown.ScaleSize uses Math.Round, which can round down. The resulting popup window is 1 device pixel too small, clipping the right and bottom border edges.

  • Use Math.Ceiling instead of Math.Round in ScaleSize to ensure the logical size always covers the full device pixel content

No effect at integer scaling factors (100%, 200%) where the division is exact.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Fix wrong border for ContextMenu on fractional resolution displays Fix ContextMenu border clipping on fractional DPI displays Mar 29, 2026
Copilot AI requested a review from jpobst March 29, 2026 21:36
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.

Wrong border when using a ContextMenu on fractional resolution displays

2 participants