diff options
author | Felipe Heidrich | 2006-04-06 15:59:29 +0000 |
---|---|---|
committer | Felipe Heidrich | 2006-04-06 15:59:29 +0000 |
commit | 545ee7680553b74303255043cb67ef59e9375788 (patch) | |
tree | d04a509f78fed7b2ac8f35110f31a009f14fff64 | |
parent | cdbc017d4e4460584e8f1db0b126e1a3cba65aaa (diff) | |
download | eclipse.platform.swt-545ee7680553b74303255043cb67ef59e9375788.tar.gz eclipse.platform.swt-545ee7680553b74303255043cb67ef59e9375788.tar.xz eclipse.platform.swt-545ee7680553b74303255043cb67ef59e9375788.zip |
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java index 9e5b5247c2..22ca399fdf 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java @@ -310,7 +310,7 @@ public void clearSelection () { public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); - int width = 0, height = 0, tmInternalLeading = 0; + int width = 0, height = 0; if (wHint == SWT.DEFAULT) { int newFont, oldFont = 0; int hDC = OS.GetDC (handle); @@ -337,11 +337,6 @@ public Point computeSize (int wHint, int hHint, boolean changed) { } } } - if ((style & SWT.READ_ONLY) != 0) { - TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA (); - OS.GetTextMetrics (hDC, tm); - tmInternalLeading = tm.tmInternalLeading; - } if (newFont != 0) OS.SelectObject (hDC, oldFont); OS.ReleaseDC (handle, hDC); } @@ -357,7 +352,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; if ((style & SWT.READ_ONLY) != 0) { - width += tmInternalLeading * 2; + width += 8; } else { int hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText != 0) { |