diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-03-14 11:27:50 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-03-14 11:27:50 -0400 |
commit | 4a81ff5c5b4e4d25039842c55dfb5b3eb538e4be (patch) | |
tree | 0deca65868e3be67fecda203825f1cffef02fdcc /src | |
parent | b35910472708645ab7071075f32f9f492ded5ace (diff) |
notebook: make sure to align the notebook tab borders properly
One of the last commits broke bottom orientation.
Diffstat (limited to 'src')
-rw-r--r-- | 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 7d152d89..f490eefe 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); |