From 73a64de553968e803df637ca40c998d4bfc5bdc3 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 6 Nov 2010 15:08:19 +0000 Subject: [PATCH] Align text correctly in left bubble; fix left-handed thought bubble --- src/bubblegen.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/bubblegen.c b/src/bubblegen.c index dcdfa4c..afcbdb1 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -146,10 +146,6 @@ static void bubble_init_left(bubble_t *b, bubble_style_t style) small_y /= 2; } - - printf("width=%d big_x=%d small_x=%d\n", - b->width, BIG_KIRCLE_X, SMALL_KIRCLE_X); - // Draw two think kircles gdk_draw_arc(b->pixmap, b->gc, TRUE, b->width - BIG_KIRCLE_X - BIG_KIRCLE_DIAM, @@ -208,9 +204,9 @@ static void bubble_init_left(bubble_t *b, bubble_style_t style) gdk_draw_lines(b->pixmap, b->gc, tip_points, 5); else gdk_draw_line(b->pixmap, b->gc, - BUBBLE_BORDER + middle, + b->width - THINK_WIDTH - BUBBLE_BORDER, CORNER_RADIUS + BUBBLE_BORDER, - BUBBLE_BORDER + middle, + b->width - THINK_WIDTH - BUBBLE_BORDER, b->height - CORNER_RADIUS); } @@ -399,8 +395,13 @@ static GdkPixbuf *bubble_tidy(bubble_t *b) static int bubble_content_left(bubble_style_t style) { - int middle = style == NORMAL ? TIP_WIDTH : THINK_WIDTH; - return BUBBLE_BORDER + middle + CORNER_RADIUS; + if (get_bool_option("left")) { + return BUBBLE_BORDER + CORNER_RADIUS; + } + else { + const int middle = style == NORMAL ? TIP_WIDTH : THINK_WIDTH; + return BUBBLE_BORDER + middle + CORNER_RADIUS; + } } static int bubble_content_top() -- 2.39.2