[gnome-initial-setup/wip/timezone: 9/11] 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/wip/timezone: 9/11] timezone: Make sure the location marker is drawn pixel-aligned
- Date: Tue, 18 Mar 2014 21:06:05 +0000 (UTC)
commit c135b6415c6911933f6ff5cede91d272b85e2b32
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]