[Xfce4-commits] <gtk-xfce-engine:master> More consisten extension rendering

Peter de Ridder noreply at xfce.org
Thu Apr 26 21:24:03 CEST 2012


Updating branch refs/heads/master
         to b7c22fea65e90fdcef938d55a3e229a966982bf4 (commit)
       from dadd9f2e09d8e8287af8b87c7a0a91b59e16940b (commit)

commit b7c22fea65e90fdcef938d55a3e229a966982bf4
Author: Peter de Ridder <peter at xfce.org>
Date:   Thu Apr 26 21:16:01 2012 +0200

    More consisten extension rendering

 gtk-2.0/xfce_theme_draw.c |    2 +-
 gtk-3.0/xfce_engine.c     |    9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gtk-2.0/xfce_theme_draw.c b/gtk-2.0/xfce_theme_draw.c
index 89f8d90..6181356 100644
--- a/gtk-2.0/xfce_theme_draw.c
+++ b/gtk-2.0/xfce_theme_draw.c
@@ -1479,7 +1479,7 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
     CHECK_ARGS;
     SANITIZE_SIZE;
 
-    gtk_style_apply_default_background(style, window, widget && !GTK_WIDGET_NO_WINDOW(widget), GTK_STATE_NORMAL, area, x, y, width, height);
+    gtk_style_apply_default_background(style, window, widget && !GTK_WIDGET_NO_WINDOW(widget), state_type, area, x, y, width, height);
 
     if (XFCE_RC_STYLE(style->rc_style)->smooth_edge)
     {
diff --git a/gtk-3.0/xfce_engine.c b/gtk-3.0/xfce_engine.c
index e04b146..d71ea06 100644
--- a/gtk-3.0/xfce_engine.c
+++ b/gtk-3.0/xfce_engine.c
@@ -373,7 +373,12 @@ static void render_background(GtkThemingEngine * engine, cairo_t * cr, gdouble x
 
     xt = MIN(xthick, width - 1);
     yt = MIN(ythick, height - 1);
-    if(smooth_edge && gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_PROGRESSBAR))
+    if (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_NOTEBOOK))
+    {
+        xt = 0;
+        yt = 0;
+    }
+    else if (smooth_edge && gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_PROGRESSBAR))
     {
         xt = 1;
         yt = 1;
@@ -1467,7 +1472,7 @@ static void render_extension(GtkThemingEngine * engine, cairo_t * cr, gdouble x,
     state = gtk_theming_engine_get_state(engine);
     gtk_theming_engine_get_border(engine, state, &border);
 
-    GTK_THEMING_ENGINE_GET_CLASS(engine)->render_background(engine, cr, x - border.left + 1, y - border.top + 1, width + border.left + border.right - 2, height + border.top + border.bottom - 2);
+    GTK_THEMING_ENGINE_GET_CLASS(engine)->render_background(engine, cr, x, y, width, height);
 
     gtk_theming_engine_get(engine, state, XFCE_SMOOTH_EDGE, &smooth_edge, NULL);
 


More information about the Xfce4-commits mailing list