diff options
author | Mickael Istria | 2020-10-24 20:00:13 +0000 |
---|---|---|
committer | Mickael Istria | 2020-10-25 16:44:47 +0000 |
commit | 44525fb902ee9d8758a1dc864fb817d05b737d7b (patch) | |
tree | a48bf93ee1378a001736f0c604457b789a48900c | |
parent | 1be260d29ed981e4d3a881bb513e2a135cacc64d (diff) | |
download | eclipse.platform.ui-44525fb902ee9d8758a1dc864fb817d05b737d7b.tar.gz eclipse.platform.ui-44525fb902ee9d8758a1dc864fb817d05b737d7b.tar.xz eclipse.platform.ui-44525fb902ee9d8758a1dc864fb817d05b737d7b.zip |
Bug 565867 - Improve tab outline bounds (cont'd)
account the outline thickness when filling the selected tab.
Change-Id: I62a5c22ef70074b9637f3bcac0232cc6a1a65812
Signed-off-by: Mickael Istria <mistria@redhat.com>
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java index b56ad786172..f92284aacbe 100644 --- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java +++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java @@ -562,16 +562,19 @@ public class CTabRendering extends CTabFolderRenderer implements ICTabRendering, selectionX2 = endX - 1; selectionY2 = bottomY; - Rectangle outlineBounds = new Rectangle( // + Rectangle outlineBoundsForOutline = new Rectangle( // Objects.equals(outerKeyline, tabOutlineColor) ? bounds.x - 1 /* superimpose lines */ : bounds.x, !onBottom && Objects.equals(outerKeyline, tabOutlineColor) ? bounds.y - 1 /* superimpose lines */ : bounds.y, bounds.width, bounds.height); if (cornerSize == SQUARE_CORNER) { - tabOutlinePoints = computeSquareTabOutline(onBottom, startX, endX, bottomY, outlineBounds, parentSize); - gc.fillRectangle(bounds); + tabOutlinePoints = computeSquareTabOutline(onBottom, startX, endX, bottomY, outlineBoundsForOutline, + parentSize); + outlineBoundsForOutline.height++; // increase area to fill by outline thickness + gc.fillRectangle(outlineBoundsForOutline); } else { - tabOutlinePoints = computeRoundTabOutline(itemIndex, onBottom, bottomY, outlineBounds, parentSize); + tabOutlinePoints = computeRoundTabOutline(itemIndex, onBottom, bottomY, outlineBoundsForOutline, + parentSize); gc.fillPolygon(tabOutlinePoints); } |