diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 14:05:53 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 14:05:53 (GMT) |
commit | 3a3fe02b6198d08b944c4b69a55b240e1e1ab813 (patch) | |
tree | dbbd4a20c0f0dd082efe2a63772c89670902006e /lib/src | |
parent | fce6d1482c8ad41c06e872c153a1822555d28b32 (diff) |
Round the progress bar angles.
Keep location entry updated.
Diffstat (limited to 'lib/src')
-rw-r--r-- | lib/src/sugar-address-entry.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/src/sugar-address-entry.c b/lib/src/sugar-address-entry.c index 90230e1..c7b7056 100644 --- a/lib/src/sugar-address-entry.c +++ b/lib/src/sugar-address-entry.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#include <math.h> #include <gtk/gtkentry.h> #include "sugar-address-entry.h" @@ -454,10 +455,17 @@ sugar_address_entry_expose(GtkWidget *widget, if (address_entry->progress != 0.0 && address_entry->progress != 1.0) { int bar_width = area_width * address_entry->progress; + float radius = 5.0; cr = gdk_cairo_create(entry->text_area); cairo_set_source_rgb(cr, 0.0, 0.0, 0.0); - cairo_rectangle(cr, 0, 0, bar_width, area_height); + + cairo_move_to (cr, radius, 0); + cairo_arc (cr, bar_width - radius, radius, radius, M_PI * 1.5, M_PI * 2); + cairo_arc (cr, bar_width - radius, area_height - radius, radius, 0, M_PI * 0.5); + cairo_arc (cr, radius, area_height - radius, radius, M_PI * 0.5, M_PI); + cairo_arc (cr, radius, radius, radius, M_PI, M_PI * 1.5); + cairo_fill(cr); cairo_destroy (cr); } |