aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-01-22 12:27:43 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-01-22 12:27:43 +0100
commitc48bb0976c283da3dec6effe0ca5392b4facf7b3 (patch)
tree497e3ae28e4e410bf9d2b61b9de00911aeed6397
parenta9e89356835246b29f2ce06278e846eb8543b9db (diff)
downloadayatana-indicator-messages-c48bb0976c283da3dec6effe0ca5392b4facf7b3.tar.gz
ayatana-indicator-messages-c48bb0976c283da3dec6effe0ca5392b4facf7b3.tar.bz2
ayatana-indicator-messages-c48bb0976c283da3dec6effe0ca5392b4facf7b3.zip
Pixel-align the lozenge text to make it less blurry
-rw-r--r--src/Makefile.am2
-rw-r--r--src/indicator-messages.c5
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 <http://www.gnu.org/licenses/>.
#include "config.h"
#include <string.h>
+#include <math.h>
#include <glib.h>
#include <glib-object.h>
#include <glib/gi18n.h>
@@ -51,8 +52,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#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);