diff options
author | Steve Northover <steve> | 2005-11-10 22:43:50 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2005-11-10 22:43:50 +0000 |
commit | a58cb0f6f5e0c790bf3e73650cde71b25de89b1e (patch) | |
tree | d0c80682ec8aa52a4a402e281ca335d268939166 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java | |
parent | ca909cd8080004e72895c89514af58ef57fd5d66 (diff) | |
download | eclipse.platform.swt-a58cb0f6f5e0c790bf3e73650cde71b25de89b1e.tar.gz eclipse.platform.swt-a58cb0f6f5e0c790bf3e73650cde71b25de89b1e.tar.xz eclipse.platform.swt-a58cb0f6f5e0c790bf3e73650cde71b25de89b1e.zip |
fix computeSize() for empty text to be the hieght of a line
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java index a4d9f3e10e..13c3f5b220 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java @@ -121,7 +121,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { return new Point (width, height); } int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); - boolean drawText = text.length () != 0; + boolean drawText = true; boolean drawImage = (bits & OS.SS_OWNERDRAW) == OS.SS_OWNERDRAW; if (drawImage) { if (image != null) { @@ -129,7 +129,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { width += rect.width; height += rect.height; if (IMAGE_AND_TEXT) { - if (drawText) width += MARGIN; + if (text.length () != 0) width += MARGIN; } else { drawText = false; } |