[gnome-themes-standard] expander: ensure the side is odd only after having centered the figure



commit f049572942418b98b36550449c6c37199cd34b1d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed May 18 17:55:10 2011 -0400

    expander: ensure the side is odd only after having centered the figure
    
    Otherwise we end up drawing between pixels, which looks blurry.

 src/adwaita_engine.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index adff156..2a5d023 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -846,13 +846,13 @@ adwaita_engine_render_expander (GtkThemingEngine *engine,
 
   side = floor (MIN (width, height));
 
-  /* make sure the side length is always odd */
-  if (((gint) side % 2) == 0)
-    side -= 1.0;
-
   x += width / 2 - side / 2;
   y += height / 2 - side / 2;
 
+  /* make sure the rendered side length is always odd */
+  if (((gint) side % 2) == 0)
+    side -= 1.0;
+
   GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_background
     (engine, cr, x, y, side, side);
   GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_frame



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