summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2007-04-03 20:45:10 +0000
committerSteve Northover <steve>2007-04-03 20:45:10 +0000
commitdd33166f8e9b6904a179583ab8b48211c4c47fc9 (patch)
tree0922d2e65e9dcca19d5d7506bf8ee27febf863ce /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
parent66496fcc5052c85cc9c1ceee88758c0c7a3b1afa (diff)
downloadeclipse.platform.swt-dd33166f8e9b6904a179583ab8b48211c4c47fc9.tar.gz
eclipse.platform.swt-dd33166f8e9b6904a179583ab8b48211c4c47fc9.tar.xz
eclipse.platform.swt-dd33166f8e9b6904a179583ab8b48211c4c47fc9.zip
fix trim (again) for Spinner and DateTime on Vista
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java4
1 files changed, 3 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 d0e09d1620..2e766bc717 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
@@ -302,7 +302,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
Rectangle trim = computeTrim (0, 0, width, height);
if (hHint == SWT.DEFAULT) {
int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL) + 2 * getBorderWidth ();
- if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) upDownHeight++;
+ if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+ upDownHeight += (style & SWT.BORDER) != 0 ? 1 : 3;
+ }
trim.height = Math.max (trim.height, upDownHeight);
}
return new Point (trim.width, trim.height);