aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-11-29 15:08:52 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-29 15:08:52 +0800
commit66031f68f0b4dc14d6db5f2a325482c0fdc1c156 (patch)
treed14c4e7a3c44a5fe4dc5290b94c297550bc6d044 /widgets/table/e-table-item.c
parent1a0d4df95730ab26981b3f26aa365aae84da36f5 (diff)
downloadgsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar.gz
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar.bz2
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar.lz
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar.xz
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.tar.zst
gsoc2013-evolution-66031f68f0b4dc14d6db5f2a325482c0fdc1c156.zip
Small cosmetic fix
svn path=/trunk/; revision=1443
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c42
1 files changed, 35 insertions, 7 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 1b98bbfce4..5816acfb23 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -452,6 +452,11 @@ eti_init (GnomeCanvasItem *item)
eti->selection_mode = GTK_SELECTION_SINGLE;
}
+#define gray50_width 2
+#define gray50_height 2
+static const char gray50_bits[] = {
+ 0x02, 0x01, };
+
static void
eti_realize (GnomeCanvasItem *item)
{
@@ -474,9 +479,13 @@ eti_realize (GnomeCanvasItem *item)
gdk_gc_set_foreground (eti->grid_gc, &canvas_widget->style->bg [GTK_STATE_NORMAL]);
eti->focus_gc = gdk_gc_new (window);
- gdk_gc_set_foreground (eti->focus_gc, &canvas_widget->style->black);
- gdk_gc_set_line_attributes (eti->focus_gc, 2, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
-
+ gdk_gc_set_foreground (eti->focus_gc, &canvas_widget->style->bg [GTK_STATE_NORMAL]);
+ gdk_gc_set_background (eti->focus_gc, &canvas_widget->style->fg [GTK_STATE_NORMAL]);
+ eti->stipple = gdk_bitmap_create_from_data (NULL, gray50_bits, gray50_width, gray50_height);
+ gdk_gc_set_ts_origin (eti->focus_gc, 0, 0);
+ gdk_gc_set_stipple (eti->focus_gc, eti->stipple);
+ gdk_gc_set_fill (eti->focus_gc, GDK_OPAQUE_STIPPLED);
+
/*
*
*/
@@ -497,6 +506,8 @@ eti_unrealize (GnomeCanvasItem *item)
eti->grid_gc = NULL;
gdk_gc_unref (eti->focus_gc);
eti->focus_gc = NULL;
+ gdk_bitmap_unref (eti->stipple);
+ eti->stipple = NULL;
eti_unrealize_cell_views (eti);
@@ -636,21 +647,38 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
f_y2 = yd + height;
f_found = TRUE;
}
-
+
xd += ecol->width;
}
yd += height + 1;
- gdk_draw_line (drawable, eti->grid_gc,
- eti->x1 - x, yd -1, eti->x1 + eti->width - x, yd -1);
+
+ if (eti->draw_grid)
+ gdk_draw_line (
+ drawable, eti->grid_gc,
+ eti->x1 - x, yd -1, eti->x1 + eti->width - x, yd -1);
}
+ if (eti->draw_grid){
+ int xd = x_offset;
+
+ for (col = first_col; col < last_col; col++){
+ ETableCol *ecol = e_table_header_get_column (eti->header, col);
+
+ gdk_draw_line (
+ drawable, eti->grid_gc,
+ xd, y_offset, xd, yd);
+
+ xd += ecol->width;
+ }
+ }
+
/*
* Draw focus
*/
if (f_found && eti->draw_focus){
gdk_draw_rectangle (
drawable, eti->focus_gc, FALSE,
- f_x1 - 1, f_y1 - 1, f_x2 - f_x1 + 2 , f_y2 - f_y1 + 2);
+ f_x1 + 1, f_y1, f_x2 - f_x1 - 2, f_y2 - f_y1 - 1);
}
}