summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2002-05-02 19:12:07 +0000
committerSilenio Quarti <silenio>2002-05-02 19:12:07 +0000
commit5ad592591306fd3680ec78937fc1f7fae37c24e2 (patch)
treef2a194861e1300b6c52f882ffe90b29fd84d4160 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
parentcdbd0fa0fe7557b729ae08b3fb2e20c60cd714f9 (diff)
downloadeclipse.platform.swt-5ad592591306fd3680ec78937fc1f7fae37c24e2.tar.gz
eclipse.platform.swt-5ad592591306fd3680ec78937fc1f7fae37c24e2.tar.xz
eclipse.platform.swt-5ad592591306fd3680ec78937fc1f7fae37c24e2.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index 85eb7186a2..cfdaa5fc3c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -198,8 +198,8 @@ void createHandle (int index) {
if ((style & SWT.BORDER) != 0) {
OS.gtk_clist_set_shadow_type(handle, OS.GTK_SHADOW_ETCHED_IN);
}
- int hsp = (style & SWT.H_SCROLL) == 0 ? OS.GTK_POLICY_NEVER : OS.GTK_POLICY_AUTOMATIC;
- int vsp = (style & SWT.V_SCROLL) == 0 ? OS.GTK_POLICY_NEVER : OS.GTK_POLICY_AUTOMATIC;
+ int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER;
+ int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER;
OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
}
@@ -312,6 +312,18 @@ public void deselectAll () {
OS.gtk_signal_handler_unblock_by_data (handle, SWT.Selection);
}
+GdkColor getBackgroundColor () {
+ int fontHandle = fontHandle ();
+ GtkStyle style = new GtkStyle ();
+ OS.memmove(style, OS.gtk_widget_get_style (fontHandle));
+ GdkColor color = new GdkColor ();
+ color.pixel = style.base0_pixel;
+ color.red = style.base0_red;
+ color.green = style.base0_green;
+ color.blue = style.base0_blue;
+ return color;
+}
+
/**
* Returns the zero-relative index of the item which is currently
* has the focus in the receiver, or -1 if no item is has focus.