Facepunch / sbox-issues

176 stars 12 forks source link

Editor context menus appear on second monitor and cut off when too far to the right of screen #4093

Open trundlr opened 1 year ago

trundlr commented 1 year ago

Describe the bug

image

Opening a context menu that is pretty close to the right side of my monitor will often open that context menu cut off on my second monitor. There is enough room for it to open on the primary monitor. In the picture above, I right clicked the player tab.

OS: Windows 11 Monitor 1: 2560x1440 with 125% DPI scale Monitor 2: 1920x1080 with 100% DPI scale

To Reproduce

  1. Find a monitor setup like described above
  2. Pull the hierarchy to the right side of your editor
  3. Open a few tabs and right click one that is quite far to the right
  4. Right click to open context menu
  5. Observe incorrect positioning and cut off context menu

Expected behavior

The context menu should open where I expect it to (on the correct monitor) and not be cut off.

Media/Files

No response

Additional context

No response

trundlr commented 10 months ago

pretty sure tony fixed this

DevulTj commented 10 months ago

I fixed this a bad way, it was reverted

garrynewman commented 10 months ago

Is this a mixed DPI problem? Does it still happen if the DPi is consistent across monitors?

trundlr commented 10 months ago

Sorry, missed this. I have 125% scaling on both monitors, and both are 1440p. It doesn't seem to be a mixed dpi issue but may be a scaled dpi issue? When I made the issue I was in mixed dpi but it still happens in my current setup.

MrBrax commented 9 months ago

https://github.com/Facepunch/sbox-issues/assets/1517911/9859de41-70ba-4692-baee-1912e4113151

This happens on my 3840x2160 150% and 2560x1440 100% dpi monitor.