summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2002-03-14 16:29:54 +0000
committerSilenio Quarti <silenio>2002-03-14 16:29:54 +0000
commit9d6ace1ce8469b22f329f9fb81b3f09a371ee5f5 (patch)
tree1d0b5241c0754dc08f5d136349ca839c7189f1ed
parent138ae8e47f52fe0aad37420966a245a170227fdf (diff)
downloadeclipse.platform.swt-9d6ace1ce8469b22f329f9fb81b3f09a371ee5f5.tar.gz
eclipse.platform.swt-9d6ace1ce8469b22f329f9fb81b3f09a371ee5f5.tar.xz
eclipse.platform.swt-9d6ace1ce8469b22f329f9fb81b3f09a371ee5f5.zip
computeSize
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java
index 81f8a29034..ac2d0a8f70 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Label.java
@@ -97,16 +97,16 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
OS.PtGetResources (handle, args.length / 3, args);
/* If we are wrapping text, calculate the height based on wHint. */
if (args [1] == OS.Pt_Z_STRING) {
- int length = OS.strlen (args [4]);
- byte [] font = new byte [length + 1];
- OS.memmove (font, args [4], length);
- String string = text;
- if (wHint != SWT.DEFAULT) {
- Display display = getDisplay ();
- string = display.wrapText (text, font, wHint);
- }
int width = wHint, height = hHint;
if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
+ int length = OS.strlen (args [4]);
+ byte [] font = new byte [length + 1];
+ OS.memmove (font, args [4], length);
+ String string = text;
+ if (wHint != SWT.DEFAULT) {
+ Display display = getDisplay ();
+ string = display.wrapText (text, font, wHint);
+ }
byte [] buffer = Converter.wcsToMbcs (null, string, false);
PhRect_t rect = new PhRect_t ();
OS.PgExtentMultiText (rect, null, font, buffer, buffer.length, args [7]);