diff options
author | Silenio Quarti <silenio> | 2005-10-19 18:45:07 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2005-10-19 18:45:07 +0000 |
commit | 0bb7f6c8c4bfb7f31f2639fdcb19ab84654502dc (patch) | |
tree | cc01677fccd67760c92024bb74e18d2d5a21d7ae | |
parent | 22f88e975bc6bad0418b74e15a41c2b096697df8 (diff) | |
download | eclipse.platform.swt-0bb7f6c8c4bfb7f31f2639fdcb19ab84654502dc.tar.gz eclipse.platform.swt-0bb7f6c8c4bfb7f31f2639fdcb19ab84654502dc.tar.xz eclipse.platform.swt-0bb7f6c8c4bfb7f31f2639fdcb19ab84654502dc.zip |
computeSize() for empty text
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java index 4897eb4950..52b615b65d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java @@ -12,6 +12,7 @@ package org.eclipse.swt.widgets; import org.eclipse.swt.internal.carbon.OS; +import org.eclipse.swt.internal.carbon.FontInfo; import org.eclipse.swt.internal.carbon.RGBColor; import org.eclipse.swt.internal.carbon.Rect; import org.eclipse.swt.internal.carbon.EventRecord; @@ -339,6 +340,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) { height = (int) h [0]; } OS.HUnlock (oDataHandle[0]); + } else { + Font font = getFont (); + FontInfo info = new FontInfo (); + OS.FetchFontInfo (font.id, font.size, font.style, info); + int fontHeight = info.ascent + info.descent; + height = fontHeight; } OS.DisposeHandle (oDataHandle[0]); } |