aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Ewing <lewing@helixcode.com>2000-06-24 00:22:50 +0800
committerLarry Ewing <lewing@src.gnome.org>2000-06-24 00:22:50 +0800
commitb92cdaf00a018c7994da1d4eb8e36c28b33a78ea (patch)
tree43c799f4ca701a5596a15d0ab8518abae4f4c7a5
parent45cca0f241c5b2c2b0952f7648b63541afc09e76 (diff)
downloadgsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar.gz
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar.bz2
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar.lz
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar.xz
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.tar.zst
gsoc2013-evolution-b92cdaf00a018c7994da1d4eb8e36c28b33a78ea.zip
draw pixmaps with he right background and selection colors.
2000-06-23 Larry Ewing <lewing@helixcode.com> * e-cell-toggle.c (etog_draw): draw pixmaps with he right background and selection colors. svn path=/trunk/; revision=3709
-rw-r--r--widgets/e-table/ChangeLog5
-rw-r--r--widgets/e-table/e-cell-toggle.c10
-rw-r--r--widgets/table/e-cell-toggle.c10
3 files changed, 23 insertions, 2 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index a906dd91f2..10da7e024e 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-23 Larry Ewing <lewing@helixcode.com>
+
+ * e-cell-toggle.c (etog_draw): draw pixmaps with he right
+ background and selection colors.
+
2000-06-23 Chris Toshok <toshok@helixcode.com>
* e-tree-model.h, e-tree-model.c: add icon_at virtual function -
diff --git a/widgets/e-table/e-cell-toggle.c b/widgets/e-table/e-cell-toggle.c
index 7331d14b84..d694c15b90 100644
--- a/widgets/e-table/e-cell-toggle.c
+++ b/widgets/e-table/e-cell-toggle.c
@@ -91,6 +91,8 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
GdkPixbuf *image;
int x, y, width, height;
+ GdkColor *background;
+
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
@@ -103,7 +105,13 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
/*
* Paint the background
*/
- gdk_draw_rectangle (drawable, GTK_WIDGET (toggle_view->canvas)->style->white_gc, TRUE, x1, y1, x2 - x1, y2 - y1);
+ if (selected){
+ background = &GTK_WIDGET (toggle_view->canvas)->style->bg [GTK_STATE_SELECTED];
+ } else {
+ background = &GTK_WIDGET (toggle_view->canvas)->style->base [GTK_STATE_NORMAL];
+ }
+ gdk_gc_set_foreground (toggle_view->gc, background);
+ gdk_draw_rectangle (drawable, toggle_view->gc, TRUE, x1, y1, x2 - x1, y2 - y1);
image = toggle->images [value];
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 7331d14b84..d694c15b90 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -91,6 +91,8 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
GdkPixbuf *image;
int x, y, width, height;
+ GdkColor *background;
+
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
@@ -103,7 +105,13 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
/*
* Paint the background
*/
- gdk_draw_rectangle (drawable, GTK_WIDGET (toggle_view->canvas)->style->white_gc, TRUE, x1, y1, x2 - x1, y2 - y1);
+ if (selected){
+ background = &GTK_WIDGET (toggle_view->canvas)->style->bg [GTK_STATE_SELECTED];
+ } else {
+ background = &GTK_WIDGET (toggle_view->canvas)->style->base [GTK_STATE_NORMAL];
+ }
+ gdk_gc_set_foreground (toggle_view->gc, background);
+ gdk_draw_rectangle (drawable, toggle_view->gc, TRUE, x1, y1, x2 - x1, y2 - y1);
image = toggle->images [value];