summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-06-24 17:39:29 +0000
committerVeronika Irvine <veronika>2003-06-24 17:39:29 +0000
commitccee34c6ad1336c9450ee1310cda886c2fef8846 (patch)
treeb2e948287bda45b33e0fe21195c1a013a4cbb162
parent9ab0cd29aa9eee88623fcf150a1c05633af15269 (diff)
downloadeclipse.platform.swt-ccee34c6ad1336c9450ee1310cda886c2fef8846.tar.gz
eclipse.platform.swt-ccee34c6ad1336c9450ee1310cda886c2fef8846.tar.xz
eclipse.platform.swt-ccee34c6ad1336c9450ee1310cda886c2fef8846.zip
*** empty log message ***
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java22
1 files changed, 14 insertions, 8 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 6ddd839cce..d7b9683ce0 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
@@ -1767,11 +1767,14 @@ private void updateCloseBar() {
if ("gtk".equals(platform)) toolbarTrim = 8; //$NON-NLS-1$
int maxHeight = tabHeight - CTabItem.TOP_MARGIN - CTabItem.BOTTOM_MARGIN - toolbarTrim;
- if (maxHeight < 3) return;
- int imageHeight = (maxHeight < 9) ? 9 : maxHeight;
-
- if (closeImage != null && closeImage.getBounds().height == imageHeight) return;
+ int imageHeight = Math.max(9, maxHeight);
+ if (closeImage != null) {
+ int height = closeImage.getBounds().height;
+ if (height == imageHeight) return;
+ if (imageHeight > maxHeight && height == maxHeight) return;
+ }
+
if (closeBar != null) closeBar.dispose();
closeBar = null;
if (inactiveCloseBar != null) inactiveCloseBar.dispose();
@@ -1824,11 +1827,14 @@ private void updateArrowBar() {
if ("gtk".equals(platform)) toolbarTrim = 8; //$NON-NLS-1$
int maxHeight = tabHeight - toolbarTrim;
- if (maxHeight < 3) return;
- int imageHeight = (maxHeight < 9) ? 9 : maxHeight;
-
- if (arrowLeftImage != null && arrowLeftImage.getBounds().height == imageHeight) return;
+ int imageHeight = Math.max(9, maxHeight);
+ if (arrowLeftImage != null) {
+ int height = arrowLeftImage.getBounds().height;
+ if (height == imageHeight) return;
+ if (imageHeight > maxHeight && height == maxHeight) return;
+ }
+
if (arrowBar != null) arrowBar.dispose();
arrowBar = null;
if (arrowLeftImage != null) arrowLeftImage.dispose();