datetime: Use constants for pin nail's location
This commit is contained in:
parent
1d4051eb4b
commit
43f33b1387
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue