From acd7737d412eeeb9d072e13d2d9b1815f334de2c Mon Sep 17 00:00:00 2001 From: Andrea Cimitan Date: Wed, 17 Nov 2010 16:45:09 +0100 Subject: fixed the redraw --- src/transport-widget.c | 51 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/transport-widget.c b/src/transport-widget.c index 1588308..eb1a8a7 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -1254,6 +1254,30 @@ draw (GtkWidget* button, cairo_t *cr) /* SHADOW_BUTTON);*/ /* }*/ + draw_gradient (cr, + X, + Y, + RECT_WIDTH, + OUTER_RADIUS, + OUTER_START, + OUTER_END); + + draw_gradient (cr, + X, + Y + 1, + RECT_WIDTH - 2, + MIDDLE_RADIUS, + MIDDLE_START, + MIDDLE_END); + + draw_gradient (cr, + X, + Y + 2, + RECT_WIDTH - 4, + MIDDLE_RADIUS, + MIDDLE_START, + MIDDLE_END); + //prev/next button if(priv->current_command == TRANSPORT_PREVIOUS) { @@ -1324,6 +1348,7 @@ draw (GtkWidget* button, cairo_t *cr) MIDDLE_RADIUS, MIDDLE_START_PRELIGHT, MIDDLE_END_PRELIGHT); + draw_gradient (cr, X, Y + 2, @@ -1359,32 +1384,6 @@ draw (GtkWidget* button, cairo_t *cr) MIDDLE_START_PRELIGHT, MIDDLE_END_PRELIGHT); } - else - { - draw_gradient (cr, - X, - Y, - RECT_WIDTH, - OUTER_RADIUS, - OUTER_START, - OUTER_END); - - draw_gradient (cr, - X, - Y + 1, - RECT_WIDTH - 2, - MIDDLE_RADIUS, - MIDDLE_START, - MIDDLE_END); - - draw_gradient (cr, - X, - Y + 2, - RECT_WIDTH - 4, - MIDDLE_RADIUS, - MIDDLE_START, - MIDDLE_END); - } // play/pause shadow if(priv->current_command != TRANSPORT_PLAY_PAUSE) -- cgit v1.2.3