summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe@ca.ibm.com>2013-05-01 17:15:33 -0400
committerBogdan Gheorghe <gheorghe@ca.ibm.com>2013-05-01 17:15:33 -0400
commit4d37e69c76f374c82ca18131ce52b31afe7f3b06 (patch)
tree08e3223c1d523ee1ac1c3b2715ddb6cf4e7d38b7 /bundles
parent45241a274b1b6b5d05ce82d64b05685046285bb0 (diff)
downloadeclipse.platform.swt-4d37e69c76f374c82ca18131ce52b31afe7f3b06.tar.gz
eclipse.platform.swt-4d37e69c76f374c82ca18131ce52b31afe7f3b06.tar.xz
eclipse.platform.swt-4d37e69c76f374c82ca18131ce52b31afe7f3b06.zip
Bug 396780 - CTabRendering doesn't draw bottom tabs correctly
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 9d6d4b0ff6..5b7012830d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -3725,7 +3725,9 @@ void updateBkImages() {
} else {
if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_DEFAULT);
Rectangle bounds = control.getBounds();
- if (bounds.y > getTabHeight() || gradientColors == null) {
+ int tabHeight = getTabHeight();
+ boolean wrapped = onBottom ? bounds.y > this.getSize().y - tabHeight : bounds.y > tabHeight;
+ if (wrapped || gradientColors == null) {
control.setBackgroundImage(null);
control.setBackground(getBackground());
} else {