[gnome-applets/wip-geiger-warnings: 2/2] window-picker: fix loss of precision warning



commit d03ab14d51504011f203c8eb74bc717bc4391df4
Author: Sebastian Geiger <sbastig gmx net>
Date:   Sat Apr 4 12:59:28 2020 +0200

    window-picker: fix loss of precision warning

 gnome-applets/window-picker/task-item.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnome-applets/window-picker/task-item.c b/gnome-applets/window-picker/task-item.c
index e72677f63..6fc76f3ed 100644
--- a/gnome-applets/window-picker/task-item.c
+++ b/gnome-applets/window-picker/task-item.c
@@ -385,8 +385,8 @@ static gboolean task_item_draw (
         gdk_cairo_set_source_pixbuf (
             cr,
             pbuf,
-            (area.x + (area.width - gdk_pixbuf_get_width (pbuf)) / 2),
-            (area.y + (area.height - gdk_pixbuf_get_height (pbuf)) / 2)
+            (area.x + (area.width - gdk_pixbuf_get_width (pbuf)) / (gdouble) 2),
+            (area.y + (area.height - gdk_pixbuf_get_height (pbuf)) / (gdouble) 2)
         );
     } else { /* create grayscale pixbuf */
         GdkPixbuf *desat = gdk_pixbuf_new (
@@ -409,8 +409,8 @@ static gboolean task_item_draw (
         gdk_cairo_set_source_pixbuf (
             cr,
             desat,
-            (area.x + (area.width - gdk_pixbuf_get_width (desat)) / 2),
-            (area.y + (area.height - gdk_pixbuf_get_height (desat)) / 2));
+            (area.x + (area.width - gdk_pixbuf_get_width (desat)) / (gdouble) 2),
+            (area.y + (area.height - gdk_pixbuf_get_height (desat)) / (gdouble) 2));
         g_object_unref (desat);
     }
     if (!item->mouse_over && attention) { /* urgent */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]