aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-text.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 37213e3904..191ac86023 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -389,6 +389,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
CellEdit *edit = text_view->edit;
gboolean edit_display = FALSE;
ECellTextLineBreaks *linebreaks;
+ GdkColor *background, *foreground;
if (edit){
@@ -414,10 +415,18 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
gdk_gc_set_clip_rectangle (fg_gc, &rect);
clip_rect = ▭
- gdk_gc_set_foreground (text_view->gc, &canvas->style->base [GTK_STATE_NORMAL]);
+
+ if (selected){
+ background = &canvas->style->bg [GTK_STATE_SELECTED];
+ foreground = &canvas->style->text [GTK_STATE_SELECTED];
+ } else {
+ background = &canvas->style->base [GTK_STATE_NORMAL];
+ foreground = &canvas->style->text [GTK_STATE_NORMAL];
+ }
+ gdk_gc_set_foreground (text_view->gc, background);
gdk_draw_rectangle (drawable, text_view->gc, TRUE,
rect.x, rect.y, rect.width, rect.height);
- gdk_gc_set_foreground (text_view->gc, &canvas->style->text [GTK_STATE_NORMAL]);
+ gdk_gc_set_foreground (text_view->gc, foreground);
x1 += 4;
y1 += 1;
@@ -551,6 +560,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
ypos = get_line_ypos(&cell, lines);
ypos += font->ascent;
+
for (i = 0; i < linebreaks->num_lines; i++) {
xpos = get_line_xpos (&cell, lines);
if ( ect->use_ellipsis && lines->ellipsis_length < lines->length) {