aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/table/e-table-click-to-add.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index e7f8c2a74e..832e7a6d9c 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -224,14 +224,7 @@ static void
etcta_realize (GnomeCanvasItem *item)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
- etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
- e_text_get_type(),
- "text", etcta->message ? etcta->message : "",
- "anchor", GTK_ANCHOR_NW,
- "width", etcta->width - 4,
- "draw_background", FALSE,
- NULL);
- e_canvas_item_move_absolute (etcta->text, 2, 2);
+
etcta->rect = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
gnome_canvas_rect_get_type(),
"x1", (double) 0,
@@ -239,9 +232,18 @@ etcta_realize (GnomeCanvasItem *item)
"x2", (double) etcta->width - 1,
"y2", (double) etcta->height - 1,
"outline_color", "black",
- "fill_color", NULL,
+ "fill_color", "white",
NULL);
+ etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
+ e_text_get_type(),
+ "text", etcta->message ? etcta->message : "",
+ "anchor", GTK_ANCHOR_NW,
+ "width", etcta->width - 4,
+ "draw_background", FALSE,
+ NULL);
+ e_canvas_item_move_absolute (etcta->text, 2, 2);
+
if (GNOME_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)
(*GNOME_CANVAS_ITEM_CLASS (etcta_parent_class)->realize)(item);
}
@@ -370,7 +372,7 @@ etcta_reflow (GnomeCanvasItem *item, int flags)
gtk_object_get(GTK_OBJECT(etcta->text),
"height", &etcta->height,
NULL);
- etcta->height += 4;
+ etcta->height += 6;
}
if (etcta->row) {
gtk_object_get(GTK_OBJECT(etcta->row),
@@ -473,6 +475,8 @@ e_table_click_to_add_get_type (void)
return type;
}
+
+/* The colors in this need to be themefied. */
void
e_table_click_to_add_commit (ETableClickToAdd *etcta)
{
@@ -482,16 +486,6 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
gtk_object_destroy(GTK_OBJECT(etcta->row));
etcta->row = NULL;
}
- if (!etcta->text) {
- etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
- e_text_get_type(),
- "text", etcta->message ? etcta->message : "",
- "anchor", GTK_ANCHOR_NW,
- "width", etcta->width - 4,
- "draw_background", FALSE,
- NULL);
- e_canvas_item_move_absolute (etcta->text, 2, 2);
- }
if (!etcta->rect) {
etcta->rect = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
gnome_canvas_rect_get_type(),
@@ -499,8 +493,18 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
"y1", (double) 0,
"x2", (double) etcta->width - 1,
"y2", (double) etcta->height - 1,
- "outline_color", "black",
- "fill_color", NULL,
+ "outline_color", "black",
+ "fill_color", "white",
+ NULL);
+ }
+ if (!etcta->text) {
+ etcta->text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(etcta),
+ e_text_get_type(),
+ "text", etcta->message ? etcta->message : "",
+ "anchor", GTK_ANCHOR_NW,
+ "width", etcta->width - 4,
+ "draw_background", FALSE,
NULL);
+ e_canvas_item_move_absolute (etcta->text, 3, 3);
}
}