[gnome-themes-standard] notebook: make sure to align the notebook tab borders properly



commit 4a81ff5c5b4e4d25039842c55dfb5b3eb538e4be
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Mar 14 11:27:50 2011 -0400

    notebook: make sure to align the notebook tab borders properly
    
    One of the last commits broke bottom orientation.

 src/adwaita_engine.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 7d152d8..f490eef 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -601,10 +601,16 @@ render_notebook_extension (GtkThemingEngine *engine,
 		cairo_translate (cr, width, height);
 	}
 
-	if (state & GTK_STATE_FLAG_ACTIVE) {
-		cairo_translate (cr, x + 0.5, y + 1.0);
-	} else {
-		cairo_translate (cr, x + 0.5, 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);



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