diff options
author | Felipe Heidrich <fheidric> | 2005-08-04 15:12:33 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2005-08-04 15:12:33 +0000 |
commit | 0c04db9704827db4302854860190137ca6eefb68 (patch) | |
tree | 748b2836550d7e0a674fe3c891a2db9fce7ac01a | |
parent | f508e585069cdbc0d3ee1180a1898e6e8297666e (diff) | |
download | eclipse.platform.swt-0c04db9704827db4302854860190137ca6eefb68.tar.gz eclipse.platform.swt-0c04db9704827db4302854860190137ca6eefb68.tar.xz eclipse.platform.swt-0c04db9704827db4302854860190137ca6eefb68.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java index cbc9937028..df08ca68d0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java @@ -269,7 +269,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont); TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA (); OS.GetTextMetrics (hDC, tm); - height = Math.max (tm.tmHeight, OS.GetSystemMetrics (OS.SM_CYVSCROLL)); + height = tm.tmHeight; RECT rect = new RECT (); int [] max = new int [1]; OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, max); @@ -297,6 +297,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; Rectangle trim = computeTrim (0, 0, width, height); + if (hHint == SWT.DEFAULT) { + int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL) + 2 * getBorderWidth (); + trim.height = Math.max (trim.height, upDownHeight); + } return new Point (trim.width, trim.height); } |