diff options
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-minicard-label.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index 7fef48a63b..241293bfe9 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -451,10 +451,10 @@ e_minicard_label_resize_children(EMinicardLabel *e_minicard_label) left_width = e_minicard_label->width / 2 - 4; gnome_canvas_item_set( e_minicard_label->fieldname, - "clip_width", (double) ( left_width ), + "clip_width", (double) MAX ( left_width, 0 ), NULL ); gnome_canvas_item_set( e_minicard_label->field, - "clip_width", (double) ( e_minicard_label->width - 8 - left_width ), + "clip_width", (double) MAX ( e_minicard_label->width - 8 - left_width, 0 ), NULL ); } diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 7f21f88f31..4cd5bd67f9 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -446,8 +446,8 @@ e_minicard_realize (GnomeCanvasItem *item) gnome_canvas_rect_get_type(), "x1", (double) 0, "y1", (double) 0, - "x2", (double) e_minicard->width - 1, - "y2", (double) e_minicard->height - 1, + "x2", (double) MAX (e_minicard->width - 1, 0), + "y2", (double) MAX (e_minicard->height - 1, 0), "outline_color", NULL, NULL ); @@ -456,8 +456,8 @@ e_minicard_realize (GnomeCanvasItem *item) gnome_canvas_rect_get_type(), "x1", (double) 2, "y1", (double) 2, - "x2", (double) e_minicard->width - 3, - "y2", (double) e_minicard->height - 3, + "x2", (double) MAX (e_minicard->width - 3, 0), + "y2", (double) MAX (e_minicard->height - 3, 0), "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL ); @@ -465,7 +465,7 @@ e_minicard_realize (GnomeCanvasItem *item) gnome_canvas_item_new( group, e_text_get_type(), "anchor", GTK_ANCHOR_NW, - "width", (double) ( e_minicard->width - 12 ), + "width", (double) MAX( e_minicard->width - 12, 0 ), "clip", TRUE, "use_ellipsis", TRUE, #if 0 |