diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2007-09-07 21:56:54 (GMT) |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2007-09-07 21:56:54 (GMT) |
commit | a80846c5f4ddab7669a71e125c42ba4337fa5f39 (patch) | |
tree | f567ca638f71229bc1e335dce25ad964e5f10998 /gtk | |
parent | fc4255437d3a8ceacb8e3598e8eebb68b114d57d (diff) |
Draw wide separators with paint_h/vline nicely centered.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/engine/sugar-style.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c index 21f14da..8502a16 100644 --- a/gtk/engine/sugar-style.c +++ b/gtk/engine/sugar-style.c @@ -427,11 +427,16 @@ sugar_style_draw_box (GtkStyle *style, } sugar_draw_progressbar_bar (cr, &info, orientation); - } else if (DETAIL ("hseparator") || DETAIL ("vseparator")) { - /* just fill the separator with bg[state] */ - gdk_cairo_set_source_color (cr, &style->bg[state_type]); - cairo_rectangle (cr, x, y, width, height); - cairo_fill (cr); + } else if (DETAIL ("hseparator")) { + /* Draw a normal separator centered in the area */ + gtk_paint_hline (style, window, state_type, area, widget, "separator", + x, x + width - 1, + y + (height - SUGAR_RC_STYLE (style->rc_style)->line_width) / 2); + } else if (DETAIL ("vseparator")) { + /* Draw a normal separator centered in the area */ + gtk_paint_vline (style, window, state_type, area, widget, "separator", + y, y + height - 1, + x + (width - SUGAR_RC_STYLE (style->rc_style)->line_width) / 2); } else if (DETAIL ("menu") || DETAIL ("palette")) { SugarInfo info; |