[gnome-themes-standard] expander: ensure both x and y are rounded to their integral part



commit 4dedecd2e972a74786b207ba364d9327e5fe803b
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Aug 9 00:49:44 2011 +0100

    expander: ensure both x and y are rounded to their integral part
    
    Otherwise we might end up drawing between pixels, which looks blurry.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656187

 src/adwaita_engine.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 43e6c80..22d3a6b 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -487,6 +487,9 @@ adwaita_engine_render_expander (GtkThemingEngine *engine,
   x += width / 2 - side / 2;
   y += height / 2 - side / 2;
 
+  x = floor (x);
+  y = floor (y);
+
   /* make sure the rendered side length is always odd */
   if (((gint) side % 2) == 0)
     side -= 1.0;



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