From 7af28d714510c7480c7f5f1cbce6ca9b3e5abdaf Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sat, 23 Feb 2013 00:32:59 +0000 Subject: [PATCH] ellipsize when !word_wrap --- x.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x.c b/x.c index 54f8dbc..1ad6377 100644 --- a/x.c +++ b/x.c @@ -191,6 +191,10 @@ static colored_layout *r_init_shared(cairo_t *c, notification *n) colored_layout *cl = malloc(sizeof(colored_layout)); cl->l = pango_cairo_create_layout(c); + if (!settings.word_wrap) { + pango_layout_set_ellipsize(cl->l, PANGO_ELLIPSIZE_MIDDLE); + } + cl->fg = x_string_to_color_t(n->color_strings[ColFG]); cl->bg = x_string_to_color_t(n->color_strings[ColBG]);