summaryrefslogtreecommitdiff
path: root/src/themes/coco
diff options
context:
space:
mode:
authorGiedrius Statkevičius <[email protected]>2015-10-16 12:47:19 +0300
committerGiedrius Statkevičius <[email protected]>2015-10-16 12:47:19 +0300
commit96949654be3fd993c5aa1a786036161f16070077 (patch)
tree24542d5d108562bfcae313b9bd5a7af06e2ee8c7 /src/themes/coco
parent9edd5d17b1b446817df75a86f694f89fa2316f72 (diff)
downloadmate-notification-daemon-96949654be3fd993c5aa1a786036161f16070077.tar.bz2
mate-notification-daemon-96949654be3fd993c5aa1a786036161f16070077.tar.xz
themes: use pi value provided by glib
Diffstat (limited to 'src/themes/coco')
-rw-r--r--src/themes/coco/coco-theme.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index b724f43..5281cc8 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -86,7 +86,6 @@ void set_notification_timeout(GtkWindow *nw, glong timeout);
void set_notification_hints(GtkWindow *nw, GHashTable *hints);
void notification_tick(GtkWindow *nw, glong remaining);
-#define M_PI 3.14159265358979323846
#define STRIPE_WIDTH 32
#define WIDTH 300
#define IMAGE_SIZE 32
@@ -132,10 +131,10 @@ nodoka_rounded_rectangle (cairo_t * cr,
int radius)
{
cairo_move_to (cr, x + radius, y);
- cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, M_PI * 2);
- cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, M_PI * 0.5);
- cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.5, M_PI);
- cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5);
+ cairo_arc (cr, x + w - radius, y + radius, radius, G_PI * 1.5, G_PI * 2);
+ cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, G_PI * 0.5);
+ cairo_arc (cr, x + radius, y + h - radius, radius, G_PI * 0.5, G_PI);
+ cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI * 1.5);
}
/* Fill background */
@@ -175,7 +174,7 @@ draw_pie(GtkWidget *pie, WindowData *windata, cairo_t *cr)
cairo_set_source_rgba (cr, 1.0, 0.4, 0.0, 0.3);
cairo_move_to(cr, PIE_RADIUS, PIE_RADIUS);
cairo_arc_negative(cr, PIE_RADIUS, PIE_RADIUS, PIE_RADIUS,
- -M_PI/2, (-0.25 + arc_angle)*2*M_PI);
+ -G_PI/2, (-0.25 + arc_angle)*2*G_PI);
cairo_line_to(cr, PIE_RADIUS, PIE_RADIUS);
cairo_fill (cr);