Skip to content

Commit 5a5032c

Browse files
committed
Reset background color after highlight the selected tab
1 parent 6c459cc commit 5a5032c

File tree

1 file changed

+2
-0
lines changed
  • bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt

1 file changed

+2
-0
lines changed

bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ void drawSelectedTab(int itemIndex, GC gc, Rectangle bounds) {
616616
}
617617

618618
if (selectedTabHighlightColor != null) {
619+
Color originalBackground = gc.getBackground();
619620
gc.setBackground(selectedTabHighlightColor);
620621
boolean highlightOnTop = drawTabHighlightOnTop;
621622
if (onBottom) {
@@ -627,6 +628,7 @@ void drawSelectedTab(int itemIndex, GC gc, Rectangle bounds) {
627628
int widthAdjustment = cornerSize == SQUARE_CORNER ? 0 : 1;
628629
gc.fillRectangle(bounds.x + horizontalOffset, bounds.y + verticalOffset, bounds.width - widthAdjustment,
629630
highlightHeight);
631+
gc.setBackground(originalBackground);
630632
}
631633

632634
if (backgroundPattern != null) {

0 commit comments

Comments
 (0)