summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter de Ridder <peter@xfce.org>2012-04-26 21:16:01 +0200
committerPeter de Ridder <peter@xfce.org>2012-04-26 21:16:01 +0200
commitb7c22fea65e90fdcef938d55a3e229a966982bf4 (patch)
treef6ea3a230292520b08dec5ed2bb99c03e76ffe06
parentdadd9f2e09d8e8287af8b87c7a0a91b59e16940b (diff)
downloadgtk-xfce-engine-b7c22fea65e90fdcef938d55a3e229a966982bf4.tar.gz
More consisten extension rendering
-rw-r--r--gtk-2.0/xfce_theme_draw.c2
-rw-r--r--gtk-3.0/xfce_engine.c9
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);