summaryrefslogtreecommitdiff
path: root/gtk-2.0/xfce_theme_draw.c
diff options
context:
space:
mode:
authorPeter de Ridder <peter@xfce.org>2014-01-05 16:16:22 +0100
committerPeter de Ridder <peter@xfce.org>2014-01-05 16:16:22 +0100
commit4d040a1e3b6a82c86399819261944b88d93b99ea (patch)
treec2fa3f788d72d387f9fbf46da11957214f484b08 /gtk-2.0/xfce_theme_draw.c
parentae2622e6917da359ab2868443bc399dff76774d5 (diff)
downloadgtk-xfce-engine-4d040a1e3b6a82c86399819261944b88d93b99ea.tar.gz
Improved Gtk2 notebook.
Diffstat (limited to 'gtk-2.0/xfce_theme_draw.c')
-rw-r--r--gtk-2.0/xfce_theme_draw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk-2.0/xfce_theme_draw.c b/gtk-2.0/xfce_theme_draw.c
index 3c5070e..b1eff5b 100644
--- a/gtk-2.0/xfce_theme_draw.c
+++ b/gtk-2.0/xfce_theme_draw.c
@@ -397,6 +397,9 @@ static void draw_shadow(GtkStyle * style, GdkWindow * window, GtkStateType state
parent = gtk_widget_get_parent(widget);
if (parent)
{
+ /* Get the background color from the parent widget.
+ * This makes a nicer corner if the background colors differ.
+ */
pstyle = gtk_widget_get_style(widget);
pbg = &pstyle->bg[gtk_widget_get_state(parent)];
}
@@ -1322,14 +1325,14 @@ static void draw_box_gap(GtkStyle * style, GdkWindow * window, GtkStateType stat
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 1.5, y + 0.5);
cairo_line_to(cr, x + 1.5, y + height - 1.5);
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c3);
cairo_move_to(cr, x + 2.5, y + height - 1.5);
cairo_line_to(cr, x + width - 1.5, y + height - 1.5);
- cairo_line_to(cr, x + width - 0.5, y + 0.5);
+ cairo_line_to(cr, x + width - 1.5, y + 0.5);
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c4);
@@ -1351,10 +1354,9 @@ static void draw_box_gap(GtkStyle * style, GdkWindow * window, GtkStateType stat
cairo_line_to(cr, x + gap_x, y + 1.5);
cairo_stroke(cr);
- cairo_rectangle(cr, x + gap_x, y + 0.5, 1, 1);
- cairo_move_to(cr, x + gap_x, y);
+ cairo_move_to(cr, x + gap_x, y + 0.5);
cairo_line_to(cr, x + gap_x + 1, y + 0.5);
- cairo_fill(cr);
+ cairo_stroke(cr);
}
if ((width - (gap_x + gap_width)) > 0)
{
@@ -1554,8 +1556,6 @@ 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), state_type, area, x, y, width, height);
-
if (XFCE_RC_STYLE(style->rc_style)->smooth_edge)
{
c1 = &style->dark[state_type];
@@ -1591,7 +1591,7 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 1.5, y + 0.5);
cairo_line_to(cr, x + 1.5, y + height - 1.5);
cairo_stroke(cr);
@@ -1643,7 +1643,7 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 0.5, y + 1.5);
cairo_line_to(cr, x + width - 1.5, y + 1.5);
cairo_stroke(cr);