Improve CTabFolder highlight appearance on higher zooms #3656
+34
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


The highlight of CTabFolders implemented in CTabRendering does not properly deal with higher zooms on Windows. The outline of the tabs is drawn with a width of one pixel whereas the highlight has an offset of one point, producing a gap at higher zooms. In addition, the highlight for rounded tabs exceeds the intended bounds.
This change adapts the rendering as follows:
One problem that is not solved by this are inconsistent heights of the highlights when using a CTabFolder with headers being placed at the bottom at 125% and 175%. The root cause is an already misplaced/miscalculated header region, at it exceeds the intended size to the bottom. So in order to improve that behavior, the header region calculation has to be fixed.
This is a proposal to overcome the current limitations of:
How it looks
Windows
CTabFolders with headers on top:

CTabFolders with headers at top:

Linux
150% used fractional scaling mode, which is why the screenshot has the same size as 200% (the OS scales down a faked 200% canvas):

MacOS