From c48bb0976c283da3dec6effe0ca5392b4facf7b3 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sun, 22 Jan 2012 12:27:43 +0100 Subject: Pixel-align the lozenge text to make it less blurry --- src/Makefile.am | 2 +- src/indicator-messages.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index c631436..9da71ad 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ libmessaging_la_CFLAGS = \ -Wl,--as-needed \ -Werror \ -DG_LOG_DOMAIN=\"Indicator-Messages\" -libmessaging_la_LIBADD = $(APPLET_LIBS) +libmessaging_la_LIBADD = $(APPLET_LIBS) -lm libmessaging_la_LDFLAGS = -module -avoid-version ###################################### diff --git a/src/indicator-messages.c b/src/indicator-messages.c index a39d7f1..4a2ee29 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -23,6 +23,7 @@ with this program. If not, see . #include "config.h" #include +#include #include #include #include @@ -51,8 +52,6 @@ with this program. If not, see . #define IS_INDICATOR_MESSAGES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_MESSAGES_TYPE)) #define INDICATOR_MESSAGES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_MESSAGES_TYPE, IndicatorMessagesClass)) -#define M_PI 3.1415926535897932384626433832795028841971693993751 - typedef struct _IndicatorMessages IndicatorMessages; typedef struct _IndicatorMessagesClass IndicatorMessagesClass; @@ -566,7 +565,7 @@ numbers_draw_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) style->fg[gtk_widget_get_state(widget)].blue/65535.0, 0.5); y += (allocation.height - layout_extents.height) / 2.0; - cairo_move_to (cr, x, y); + cairo_move_to (cr, round (x), round (y)); pango_cairo_layout_path (cr, layout); cairo_fill (cr); -- cgit v1.2.3