diff options
author | Veronika Irvine <veronika> | 2002-08-22 20:00:43 +0000 |
---|---|---|
committer | Veronika Irvine <veronika> | 2002-08-22 20:00:43 +0000 |
commit | e492e10a7c3053b74d0207d231057197d2f39990 (patch) | |
tree | 8bc6dabf26ad80c72e8eb1e6f00f2c24288dba83 | |
parent | adf021ffee0220cefa221a69607371090d0b64bb (diff) | |
download | eclipse.platform.swt-e492e10a7c3053b74d0207d231057197d2f39990.tar.gz eclipse.platform.swt-e492e10a7c3053b74d0207d231057197d2f39990.tar.xz eclipse.platform.swt-e492e10a7c3053b74d0207d231057197d2f39990.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | 15 |
1 files changed, 12 insertions, 3 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 059d00d9df..7adbb81716 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 @@ -1832,11 +1832,20 @@ private void showToolTip (int x, int y) { labelSize.x += 2; labelSize.y += 2;
label.setSize(labelSize);
tip.pack();
+ /*
+ * On some platforms, there is a minimum size for a shell
+ * which may be greater than the label size.
+ * To avoid having the background of the tip shell showing
+ * around the label, force the label to fill the entire client area.
+ */
+ Rectangle area = tip.getClientArea();
+ label.setSize(area.width, area.height);
+ /*
+ * Position the tooltip and ensure that it is not located off
+ * the screen.
+ */
Point pt = new Point(item.x + item.width / 4, item.y + item.height + 2);
pt = toDisplay(pt);
- /*
- * Ensure that the tooltip is on the screen.
- */
Rectangle rect = display.getBounds();
Point tipSize = tip.getSize();
pt.x = Math.max (0, Math.min (pt.x, rect.width - tipSize.x));
|