Bug 413854 - "Wrong rendering of -moz-appearance: listbox and -moz-appearance: treeview" [p=frnchfrgg-mozbugs@altern.org (RIVAUD Julien [_FrnchFrgg_]) r=Ventron sr=roc a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2008-01-26 20:27:35 -08:00
parent 9b79586fc1
commit 733ced8a2d

View File

@ -1249,6 +1249,8 @@ moz_gtk_treeview_paint(GdkDrawable* drawable, GdkRectangle* rect,
GdkRectangle* cliprect, GtkWidgetState* state,
GtkTextDirection direction)
{
gint xthickness, ythickness;
GtkStyle *style;
GtkStateType state_type;
@ -1266,15 +1268,20 @@ moz_gtk_treeview_paint(GdkDrawable* drawable, GdkRectangle* rect,
&gTreeViewWidget->style->base[state_type]);
style = gTreeViewWidget->style;
xthickness = XTHICKNESS(style);
ythickness = YTHICKNESS(style);
TSOffsetStyleGCs(style, rect->x, rect->y);
gtk_paint_flat_box(style, drawable, state_type, GTK_SHADOW_NONE,
cliprect, gTreeViewWidget, "treeview", rect->x + 1,
rect->y + 1, rect->width - 1, rect->height - 1);
cliprect, gTreeViewWidget, "treeview",
rect->x + xthickness, rect->y + ythickness,
rect->width - 2 * xthickness,
rect->height - 2 * ythickness);
gdk_draw_rectangle(drawable, style->dark_gc[state_type], FALSE, rect->x,
rect->y, rect->width - 1, rect->height - 1);
gtk_paint_shadow(style, drawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
cliprect, gTreeViewWidget, "scrolled_window",
rect->x, rect->y, rect->width, rect->height);
return MOZ_GTK_SUCCESS;
}