diff options
author | Lakshmi Shanmugam | 2018-07-10 06:28:34 +0000 |
---|---|---|
committer | Lakshmi Shanmugam | 2018-07-10 06:28:34 +0000 |
commit | 2ef6954b2724f4b0e6be7d10562b1cdac3ce7206 (patch) | |
tree | 88960bb0f46deb857382c7e1cbe0a0aecdc73d90 | |
parent | f7855b87adccfa464caff332a06eb3c1205b5098 (diff) | |
download | eclipse.platform.swt-2ef6954b2724f4b0e6be7d10562b1cdac3ce7206.tar.gz eclipse.platform.swt-2ef6954b2724f4b0e6be7d10562b1cdac3ce7206.tar.xz eclipse.platform.swt-2ef6954b2724f4b0e6be7d10562b1cdac3ce7206.zip |
Bug 536862: DateTime DROPDOWN behavior on Mac is not consistent with
other platforms
checkStyle() code on Mac is now consistent with Windows code.
DATE style should be set by default if no other (TIME or CALENDAR) style
is set. This should be done before the check for DROP_DOWN style.
Also, removed the HINT from javadoc as DROP_DOWN style is supported on
all 3 platforms now.
Change-Id: Ibf04cbfa8aa19b4e57a548016a93ac7bf14f921a
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java index 565c47f98a..30f984654c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java @@ -32,7 +32,7 @@ import org.eclipse.swt.internal.cocoa.*; * <p> * Note: Only one of the styles DATE, TIME, or CALENDAR may be specified, * and only one of the styles SHORT, MEDIUM, or LONG may be specified. - * The DROP_DOWN style is a <em>HINT</em>, and it is only valid with the DATE style. + * The DROP_DOWN style is only valid with the DATE style. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -103,9 +103,10 @@ static int checkStyle (int style) { * the SWT style. */ style &= ~(SWT.H_SCROLL | SWT.V_SCROLL); + style = checkBits (style, SWT.DATE, SWT.TIME, SWT.CALENDAR, 0, 0, 0); style = checkBits (style, SWT.MEDIUM, SWT.SHORT, SWT.LONG, 0, 0, 0); if ((style & SWT.DATE) == 0) style &=~ SWT.DROP_DOWN; - return checkBits (style, SWT.DATE, SWT.TIME, SWT.CALENDAR, 0, 0, 0); + return style; } @Override |