summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-10-30 17:55:42 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-10-30 17:55:42 -0400
commitccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860 (patch)
tree150f22ca51340c4b93e96f23205564020a20c817 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
parent9e6ed5ddefaae266127428adb6c5fbedbb333dc4 (diff)
downloadeclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.tar.gz
eclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.tar.xz
eclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.zip
Bug 389910 - Substitute GdkColor with GdkRGBA
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 6837925800..fe67d523f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -2627,10 +2627,14 @@ long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /*
if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED;
if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED;
if ((drawState & SWT.SELECTED) != 0) {
- long /*int*/ style = OS.gtk_widget_get_style (widget);
- //TODO - parity and sorted
- byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
- gtk_render_frame (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+ if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) {
+ //TODO draw selection on GTK3
+ } else {
+ long /*int*/ style = OS.gtk_widget_get_style (widget);
+ //TODO - parity and sorted
+ byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
+ OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+ }
} else {
if (wasSelected) drawForeground = gc.getForeground ().handle;
}
@@ -2932,7 +2936,9 @@ void selectFocusIndex (int index) {
void setBackgroundColor (GdkColor color) {
super.setBackgroundColor (color);
- OS.gtk_widget_modify_base (handle, 0, color);
+ if (OS.GTK_VERSION < OS.VERSION (3, 0, 0)) {
+ OS.gtk_widget_modify_base (handle, 0, color);
+ }
}
void setBackgroundPixmap (Image image) {