Bug 434080: GTK treelines are drawn in random colour when no specific rule is given; r/sr=roc

This commit is contained in:
Karsten Düsterloh 2008-09-01 22:52:38 +02:00
parent 0bc3b8e923
commit 1879945e28

View File

@ -3197,9 +3197,15 @@ nsTreeBodyFrame::PaintCell(PRInt32 aRowIndex,
const nsStyleBorder* borderStyle = lineContext->GetStyleBorder();
nscolor color;
PRBool transparent; PRBool foreground;
PRBool transparent, foreground;
borderStyle->GetBorderColor(NS_SIDE_LEFT, color, transparent, foreground);
if (foreground) {
// GetBorderColor didn't touch color, thus grab it from the treeline context
color = lineContext->GetStyleColor()->mColor;
} else if (transparent) {
// GetBorderColor didn't touch color, thus set it to transparent
color = NS_RGBA(0, 0, 0, 0);
}
aRenderingContext.SetColor(color);
PRUint8 style;
style = borderStyle->GetBorderStyle(NS_SIDE_LEFT);