diff options
author | Steve Northover <steve> | 2007-04-03 20:45:10 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2007-04-03 20:45:10 +0000 |
commit | dd33166f8e9b6904a179583ab8b48211c4c47fc9 (patch) | |
tree | 0922d2e65e9dcca19d5d7506bf8ee27febf863ce /bundles | |
parent | 66496fcc5052c85cc9c1ceee88758c0c7a3b1afa (diff) | |
download | eclipse.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')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java index 95ac31ffe9..5515c84e1f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java @@ -311,7 +311,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { width += upDownWidth + MARGIN; int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL); // TODO: On Vista, can send DTM_GETDATETIMEPICKERINFO to ask the Edit control what its margins are - if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) upDownHeight++; + if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) upDownHeight += 7; height = Math.max (height, upDownHeight); } } 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); |