-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Higher resolutions causes applications with the chromium and firefox rule flag to have a border gap #207
Comments
I've been checking this out a bit and I think a fix will likely come from src/renderer/win.rs. Here's a couple things I've been looking at regarding this issue. The first thing I noticed on the machine I develop on when I go into Windows and run nog I'm getting 0 out from the calls to GetSystemMetricsForDpi which according to the docs is an error. I changed some of the code locally a bit to test to attempt GetSystemMetricsForDpi and then fall back on GetSystemMetrics which does give me results. A little verbose but something like this...
And also calling AdjustWindowRectEx instead of AdjustWindowRectExForDpi if the Dpi functions returns 0. Doing that makes it behave a bit more consistently across my monitors but there's still size issues that I think are caused by the Windows rect functions and Chrome/Firefox using this shadow border thing. The weird offset rendering that @keepitsane posted above and that I've noticed on my machines matches the sizes of these shadow borders. I tried this to find the shadow offset in order to size the Chrome window better:
And it looks a bit more aligned. The following shows the chrome window surrounded by notepad tiles. Left side is unfocused and right side is focused. But Firefox placed in the same spot behaves very differently: Additionally at some point when resizing tiles if I make a firefox tile too small it just starts ignoring the sizing like this (notice the left/right side alignments of the tile above the firefox window and the tile below it but firefox just overlaps everything) I'll keep messing with it but honestly if there's a way to just remove the shadow border on them that might be easier. I might experiment with manually setting styles. |
The borders of chrome/firefox are really a fucking mystery. I have no idea who the fuck thought this would be a good idea.
Initially I tried to automatically calculate the border size to then size the window correctly, but I couldn't manage to do it. |
Seems like the higher the monitor resolution the bigger the gap between the appbar and the window becomes.
This monitor 1 at
3440 * 1440
This monitor 2 at
1920 * 1080
This monitor 3 at
2560 * 1440
If I take monitor 3 and lower the resolution to
1920 * 1080
the gap goes away complete.When using firefox I only get a gap on the top most edge below the appbar when the resolution is about
1920*1080
. For the left, right, and bottom edge I see no gap at all at any resolution.When testing out the chromium version of Microsoft Edge, with the chromium rule set in my config. I see no gap at all on both monitor 1 (
3440 * 1440
) and monitor 2 (1920 * 1080
), but a slight gap at the top on monitor 3 (2560 * 1440
).Left is Firefox and right is Edge
Adjust monitor 3 to
1920 * 1080
fixes it for bothRegardless of the browser and resolution I only see a gap at the top, never on the sides or bottom.
Also looking at the first set of screenshots I think why monitor 1 doesn't have a gap at all with Edge is because for some reason the gap on Edge is smaller the Firefox so it is able to fill the smaller gap in comparison to monitor 3.
The text was updated successfully, but these errors were encountered: