datetime: Use constants for pin nail's location

This commit is contained in:
Bastien Nocera 2012-10-18 09:08:32 +02:00
parent 1d4051eb4b
commit 43f33b1387

View file

@ -32,6 +32,9 @@ G_DEFINE_TYPE (CcTimezoneMap, cc_timezone_map, GTK_TYPE_WIDGET)
#define TIMEZONE_MAP_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_TIMEZONE_MAP, CcTimezoneMapPrivate))
#define PIN_HOT_POINT_X 8
#define PIN_HOT_POINT_Y 14
typedef struct
{
@ -389,7 +392,7 @@ cc_timezone_map_draw (GtkWidget *widget,
if (pin)
{
gdk_cairo_set_source_pixbuf (cr, pin, pointx - 8, pointy - 14);
gdk_cairo_set_source_pixbuf (cr, pin, pointx - PIN_HOT_POINT_X, pointy - PIN_HOT_POINT_Y);
cairo_paint (cr);
}
}