From 3a3fe02b6198d08b944c4b69a55b240e1e1ab813 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 12 Oct 2006 14:05:53 +0000 Subject: Round the progress bar angles. Keep location entry updated. --- (limited to 'lib') 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 #include #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); } -- cgit v0.9.1