[gnome-themes-standard] Revert "notebook: don't trim the allocated area when drawing the tab shape"



commit 8611185901042313f91bc3944c669a64ccf8586f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Nov 21 10:57:17 2011 -0500

    Revert "notebook: don't trim the allocated area when drawing the tab shape"
    
    Artifacts were not caused by the theme, but from an actual bug in
    GtkNotebook, so this is not needed.
    
    This reverts commit 40a6d541cbdef1d31b9b8636c85f3916cd8a5809.

 src/adwaita_engine.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 7c4f3fe..296d106 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -320,9 +320,20 @@ render_notebook_extension (GtkThemingEngine *engine,
       cairo_translate (cr, width, height);
     }
 
-  cairo_translate (cr, x, y);
+  if (gap_side == GTK_POS_BOTTOM)
+    cairo_translate (cr,
+                     x + 0.5,
+                     (state & GTK_STATE_FLAG_ACTIVE) ?
+                     y + 1.0 : y);
+  else if (gap_side == GTK_POS_TOP)
+    cairo_translate (cr,
+                     x - 0.5,
+                     (state & GTK_STATE_FLAG_ACTIVE) ?
+                     y - 1.0 : y);
+
   cairo_rotate (cr, angle);
 
+  width -= 1.0;
   draw_tab_shape_active (cr, tab_curvature, 0, 0, width, height);
 
   if (background_pattern != NULL)



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