Commit 92aa308
committed
Improve CTabFolder highlight appearance on higher zooms
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:
- When the highlight is drawn rounded at the top, the shape of the
outline is taken and adapted to the intended highlight height to draw
the highlight.
- In all other cases the highlight is drawn as a simple line of
according width with an offset of half the line width with respect to
its bounds. To compensate for the 1px border that is drawn on top of the
highlight when it is placed at the top of a tab, another line of
according size is drawn next to the highlight to make its height fit
again.1 parent e81ba1c commit 92aa308
1 file changed
Lines changed: 34 additions & 9 deletions
File tree
- bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt
Lines changed: 34 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
621 | 622 | | |
622 | 623 | | |
623 | 624 | | |
| 625 | + | |
624 | 626 | | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | 627 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
635 | 660 | | |
636 | 661 | | |
637 | 662 | | |
| |||
0 commit comments