aboutsummaryrefslogtreecommitdiffstats
path: root/src/sato-draw-cairo.c
diff options
context:
space:
mode:
authorThomas Wood <thomas@openedhand.com>2008-02-12 13:28:40 +0000
committerThomas Wood <thomas@openedhand.com>2008-02-12 13:28:40 +0000
commit039e4122b951b3eb8a1d461158d431860d0d99f4 (patch)
tree5122809d2add37797d2b8d7d6ed1457d1fd81eec /src/sato-draw-cairo.c
parentf9b666c5a33f77fdea5b6aa758926e45d7ad57ea (diff)
downloadgtk-sato-engine-039e4122b951b3eb8a1d461158d431860d0d99f4.tar.gz
gtk-sato-engine-039e4122b951b3eb8a1d461158d431860d0d99f4.tar.bz2
gtk-sato-engine-039e4122b951b3eb8a1d461158d431860d0d99f4.zip
* src/sato-draw-cairo.c: (sato_draw_extension):
Fix left and right active tabs in cairo version
Diffstat (limited to 'src/sato-draw-cairo.c')
-rw-r--r--src/sato-draw-cairo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sato-draw-cairo.c b/src/sato-draw-cairo.c
index 3a058a7..a1a0cdc 100644
--- a/src/sato-draw-cairo.c
+++ b/src/sato-draw-cairo.c
@@ -448,7 +448,6 @@ sato_draw_extension (GtkStyle * style, GdkWindow * window,
break;
case GTK_POS_BOTTOM: /* top tab */
if (state_type == GTK_STATE_NORMAL)
- /* this allows for some overlap */
height += LINE_WIDTH;
cairo_move_to (cr, x, y + height);
@@ -457,12 +456,16 @@ sato_draw_extension (GtkStyle * style, GdkWindow * window,
cairo_line_to (cr, x + width, y + height);
break;
case GTK_POS_LEFT: /* right tab */
+ if (state_type == GTK_STATE_NORMAL)
+ x -= LINE_WIDTH / 2;
cairo_move_to (cr, x, y);
cairo_arc (cr, x + width - RADIUS, y + RADIUS, RADIUS, M_PI * 1.5, 0);
cairo_arc (cr, x + width - RADIUS, y + height - RADIUS, RADIUS, 0, M_PI * 0.5);
cairo_line_to (cr, x, y + height);
break;
case GTK_POS_RIGHT: /* left tab */
+ if (state_type == GTK_STATE_NORMAL)
+ width += LINE_WIDTH;
cairo_move_to (cr, x + width, y);
cairo_arc_negative (cr, x + RADIUS, y + RADIUS, RADIUS, M_PI * 1.5, M_PI);
cairo_arc_negative (cr, x + RADIUS, y + height - RADIUS, RADIUS, M_PI, M_PI * 0.5);