From ea9d908a88bf037e39dfd68b4cfa07750e11c49a Mon Sep 17 00:00:00 2001 From: rbbrnc Date: Tue, 5 Apr 2011 12:01:37 +0200 Subject: [PATCH] Better icon alignment --- src/utils/test_list_x11.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/utils/test_list_x11.c b/src/utils/test_list_x11.c index ba06720..25bf197 100644 --- a/src/utils/test_list_x11.c +++ b/src/utils/test_list_x11.c @@ -180,7 +180,8 @@ static int list_add_item(Widget parent, const struct mail_entry *item) char *icon = NULL; XImage *pix = NULL; - Widget box; + Widget box_v; + Widget box_h; Widget addr; Widget subj; Widget iv; @@ -193,27 +194,28 @@ static int list_add_item(Widget parent, const struct mail_entry *item) icon = icon_get_path((char *) item->addr_md5); - box = XtVaCreateManagedWidget("box", boxWidgetClass, parent, - XtNorientation, XtorientVertical, + box_h = XtVaCreateManagedWidget("box_h", boxWidgetClass, parent, + XtNorientation, XtorientHorizontal, NULL); pix = create_ximage_from_PNG(d, visual, depth, icon, NULL); - iv = XtVaCreateManagedWidget("IV", imageViewWidgetClass, box, + iv = XtVaCreateManagedWidget("IV", imageViewWidgetClass, box_h, XtNximage, pix, XtNimageType, 0, NULL); + box_v = XtVaCreateManagedWidget("box_v", boxWidgetClass, box_h, + XtNorientation, XtorientVertical, + NULL); - addr = XtVaCreateManagedWidget("from", labelWidgetClass, - box, + addr = XtVaCreateManagedWidget("from", labelWidgetClass, box_v, XtNborderWidth, 0, XtNwidth, 400, XtNlabel, item->addr, XtNjustify, XtJustifyLeft, NULL); - subj = XtVaCreateManagedWidget("subj", labelWidgetClass, - box, + subj = XtVaCreateManagedWidget("subj", labelWidgetClass, box_v, XtNborderWidth, 0, XtNwidth, 400, XtNlabel, item->subj, -- 2.11.4.GIT