From 1879945e2889ae8dd53c71c805227aa2f4666ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20D=C3=BCsterloh?= Date: Mon, 1 Sep 2008 22:52:38 +0200 Subject: [PATCH] Bug 434080: GTK treelines are drawn in random colour when no specific rule is given; r/sr=roc --- layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 179790fcb71..f8e19e0e239 100644 --- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -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);