Skip to content

Fix tray menu dpi - #108

Merged
G-Stas merged 4 commits into
mainfrom
fix/tray-menu-dpi
Oct 26, 2026
Merged

G-Stas merged 4 commits into
mainfrom
fix/tray-menu-dpi

Conversation

@G-Stas

@G-Stas G-Stas commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner
  • H.NotifyIcon converts the cursor's pixels with one DPI for every monitor, so with a 175% main monitor next to a 100% one the menu opened on the other monitor at the wrong size. The menu is now opened by WPF's mouse placement, which takes the cursor's pixels as they are.
  • WPF-UI's menu templates put the drop shadow on the border that holds the items, so the items are drawn into a bitmap first, which lands between pixels at scales like 175% and blurs the text. The tray menu and its device submenu now draw the shadow from a separate border behind the items.

H.NotifyIcon converts the cursor's pixels with one DPI for every monitor, so with a 175% main
monitor next to a 100% one the menu opened on the other monitor at the wrong size. The menu is
now opened by WPF's mouse placement, which takes the cursor's pixels as they are.
WPF-UI's menu templates put the drop shadow on the border that holds the items, so the items are
drawn into a bitmap first, which lands between pixels at scales like 175% and blurs the text.
The tray menu and its device submenu now draw the shadow from a separate border behind the items.
The saved position is in physical pixels, and UI Automation scales window rectangles for the
test process when the primary screen isn't at 100%, so the test failed at 175%.
The tray menu, its templates and its converter are in View/TrayMenu.xaml, merged into the mixer window's resources.
@G-Stas
G-Stas merged commit ca198af into main Oct 26, 2026
2 checks passed
@G-Stas
G-Stas deleted the fix/tray-menu-dpi branch November 3, 2026 19:35
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.

1 participant