diff options
author | Giedrius Statkevičius <[email protected]> | 2015-10-16 12:47:19 +0300 |
---|---|---|
committer | Giedrius Statkevičius <[email protected]> | 2015-10-16 12:47:19 +0300 |
commit | 96949654be3fd993c5aa1a786036161f16070077 (patch) | |
tree | 24542d5d108562bfcae313b9bd5a7af06e2ee8c7 /src/themes/nodoka | |
parent | 9edd5d17b1b446817df75a86f694f89fa2316f72 (diff) | |
download | mate-notification-daemon-96949654be3fd993c5aa1a786036161f16070077.tar.bz2 mate-notification-daemon-96949654be3fd993c5aa1a786036161f16070077.tar.xz |
themes: use pi value provided by glib
Diffstat (limited to 'src/themes/nodoka')
-rw-r--r-- | src/themes/nodoka/nodoka-theme.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c index e6443bf..a1f996f 100644 --- a/src/themes/nodoka/nodoka-theme.c +++ b/src/themes/nodoka/nodoka-theme.c @@ -102,7 +102,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 400 #define IMAGE_SIZE 32 @@ -304,10 +303,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); } /* Rounded rectangle with arrow */ @@ -343,9 +342,9 @@ nodoka_rounded_rectangle_with_arrow (cairo_t * cr, } cairo_arc (cr, rect.x + rect.width - radius, rect.y + radius, radius, - M_PI * 1.5, M_PI * 2); + G_PI * 1.5, G_PI * 2); cairo_arc (cr, rect.x + rect.width - radius, - rect.y + rect.height - radius, radius, 0, M_PI * 0.5); + rect.y + rect.height - radius, radius, 0, G_PI * 0.5); if (!arrow_up) { @@ -358,9 +357,9 @@ nodoka_rounded_rectangle_with_arrow (cairo_t * cr, } cairo_arc (cr, rect.x + radius, rect.y + rect.height - radius, - radius, M_PI * 0.5, M_PI); - cairo_arc (cr, rect.x + radius, rect.y + radius, radius, M_PI, - M_PI * 1.5); + radius, G_PI * 0.5, G_PI); + cairo_arc (cr, rect.x + radius, rect.y + radius, radius, G_PI, + G_PI * 1.5); cairo_translate (cr, -x, -y); @@ -517,7 +516,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); |