summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt
diff options
context:
space:
mode:
authorSteve Northover <steve>2008-04-21 17:17:01 +0000
committerSteve Northover <steve>2008-04-21 17:17:01 +0000
commitd196ca2bdd99c1e9ef2c0ba72c71fa951c2881db (patch)
tree7c9804cd54bf50ac3604eb020ea49b1255e8dadf /bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt
parentb332e1ecb6421f664a18c1bcf96e2b94c24f1610 (diff)
downloadeclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.tar.gz
eclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.tar.xz
eclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.zip
NO_SCROLL must be set along with H_SCROLL or V_SCROLL to get only one scroll bar (for backwards compatibility)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java14
2 files changed, 6 insertions, 22 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
index 6f8d11f61f..c21a18c789 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
@@ -179,22 +179,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* WPF is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
index 3d64c14992..6e6a15c625 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
@@ -175,22 +175,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* WPF is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);