summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-08-05 19:42:28 +0000
committerVeronika Irvine <veronika>2003-08-05 19:42:28 +0000
commit41401bd7705a65169c979ec237069503afd209f0 (patch)
tree643c89ac92f846c8e1f66d9ff332b5243c8e4540
parent3c8fe3197a9a8c3ee28413369498767a1dbf0ef5 (diff)
downloadeclipse.platform.swt-41401bd7705a65169c979ec237069503afd209f0.tar.gz
eclipse.platform.swt-41401bd7705a65169c979ec237069503afd209f0.tar.xz
eclipse.platform.swt-41401bd7705a65169c979ec237069503afd209f0.zip
bug 40156
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java15
1 files changed, 6 insertions, 9 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 a9cdb93c5a..22a9c5ea7e 100755
--- 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
@@ -626,16 +626,13 @@ private void drawBorder(GC gc) {
public Rectangle getClientArea() {
checkWidget();
Point size = getSize();
- if (items.length == 0) {
- if (!showBorders) return super.getClientArea();
- int width = size.x - borderRight - 2;
- int height = size.y - borderBottom - 2;
- return new Rectangle(borderRight + 1, borderBottom + 1, width, height);
- } else {
- int width = size.x - 2*marginWidth - borderLeft - borderRight;
- int height = size.y - 2*marginHeight - borderTop - borderBottom - tabHeight - 1;
- return new Rectangle(xClient, yClient, width, height);
+ int width = size.x - borderLeft - borderRight - 2*marginWidth;
+ int height = size.y - borderTop - borderBottom - 2*marginHeight;
+ if (items.length == 0) {
+ return new Rectangle(borderLeft + marginWidth, borderTop + marginHeight, width, height);
}
+ height -= tabHeight + 1; //+1 for line under tabs
+ return new Rectangle(xClient, yClient, width, height);
}
/**
* Returns the height of the tab