Repository navigation
Fix: Apps list scrollbar on Windows 10 when content fits window - #104
Conversation
G-Stas
left a comment
There was a problem hiding this comment.
Thanks for catching this! I’m not sure about a hardcoded value +2 though. The gap probably changes with display scaling, and the pop-up and window modes have different borders too. Could you measure the actual difference in MainView.FitHeight instead (window Height minus the content’s ActualHeight) and add that? Then you wouldn’t need the Windows version check either. And please keep the old comment in MeasureHeights.
You were absolutely right, thanks. I've reverted
While testing at 125% I found that this gap was not the only cause of the scrollbar. In window mode the title bar (48 DIPs) counted against the Tested on Windows 10 in both pop-up and window modes:
With 1, 2, 3 and 4 apps there is no scrollbar in any of these. With 5 apps there is none at 96 DPI, but there is one at 125%. That one is expected: the requested height (592.8 DIPs) exceeds the cap (542.4 DIPs, 60% of the work area plus the title bar), and a given screen has fewer DIPs at 125%, so the list scrolls instead of growing past the limit. |
Description
This PR addresses a visual glitch specifically occurring on Windows 10, where a vertical scrollbar consistently appears in the apps list when multiple applications (2 or more) are active, even though there is enough theoretical space to display them without scrolling.
It appears related to how borderless
WindowChromecalculates the client area on Windows 10, which might slightly truncate available space due to invisible resizing borders, possibly related to the WPF behavior noted in issue #3887:To work around this potential discrepancy:
+2pixel compensation to theappsheight calculation inMixerView.MeasureHeightsto absorb sub-pixel rendering discrepancies.Build < 22000) so it applies to Windows 10, keeping the native Windows 11 rendering behavior completely untouched.Visual Comparison (Windows 10)