summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org
diff options
context:
space:
mode:
authorSteve Northover <steve>2007-04-03 20:30:59 +0000
committerSteve Northover <steve>2007-04-03 20:30:59 +0000
commit66496fcc5052c85cc9c1ceee88758c0c7a3b1afa (patch)
tree621c682dbe86519d2dedfed279d4e1086b89eca2 /bundles/org.eclipse.swt/Eclipse SWT/win32/org
parent53107e2e95a8f1579427070d24c5fbc96c44ae3f (diff)
downloadeclipse.platform.swt-66496fcc5052c85cc9c1ceee88758c0c7a3b1afa.tar.gz
eclipse.platform.swt-66496fcc5052c85cc9c1ceee88758c0c7a3b1afa.tar.xz
eclipse.platform.swt-66496fcc5052c85cc9c1ceee88758c0c7a3b1afa.zip
fix height too small for Spinner and DateTime picker on Vista
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java1
2 files changed, 5 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 4c982b3185..95ac31ffe9 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
@@ -309,8 +309,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
OS.ReleaseDC (handle, hDC);
int upDownWidth = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
width += upDownWidth + MARGIN;
- // TODO: On Vista, can send DTM_GETDATETIMEPICKERINFO to ask the Edit control what its margins are
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++;
height = Math.max (height, upDownHeight);
}
}
@@ -319,7 +320,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = hHint;
int border = getBorderWidth ();
- width += border * 2; height += border * 2;
+ width += border * 2;
+ height += border * 2;
return new Point (width, height);
}
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 1034908c53..d0e09d1620 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,6 +302,7 @@ 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++;
trim.height = Math.max (trim.height, upDownHeight);
}
return new Point (trim.width, trim.height);