[gnome-initial-setup] timezone: Make sure the location marker is drawn pixel-aligned
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] timezone: Make sure the location marker is drawn pixel-aligned
- Date: Wed, 19 Mar 2014 15:55:14 +0000 (UTC)
commit feb10eacf86ab7083e7c94ba960e7d5e9661bfde
Author: Kalev Lember <kalevlember gmail com>
Date: Tue Mar 18 20:54:24 2014 +0100
timezone: Make sure the location marker is drawn pixel-aligned
.../pages/timezone/cc-timezone-map.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/pages/timezone/cc-timezone-map.c
b/gnome-initial-setup/pages/timezone/cc-timezone-map.c
index 9459a05..f94a31e 100644
--- a/gnome-initial-setup/pages/timezone/cc-timezone-map.c
+++ b/gnome-initial-setup/pages/timezone/cc-timezone-map.c
@@ -223,8 +223,8 @@ draw_pin (CcTimezoneMap *map,
pointx = convert_longitude_to_x (longitude, alloc.width);
pointy = convert_latitude_to_y (latitude, alloc.height);
- if (pointy > alloc.height)
- pointy = alloc.height;
+ pointx = CLAMP (floor (pointx), 0, alloc.width);
+ pointy = CLAMP (floor (pointy), 0, alloc.height);
gdk_cairo_set_source_pixbuf (cr, pin, pointx - PIN_HOT_POINT_X, pointy - PIN_HOT_POINT_Y);
cairo_paint (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]