Patch from Neil Deakin <enndeakin@sympatico.ca> to fix overlong button underlines (214956, r+sr=dbaron).

This commit is contained in:
brendan%mozilla.org 2003-11-05 00:05:10 +00:00
parent 697fa403a0
commit bbfcf997ef

View File

@ -401,17 +401,17 @@ nsTextBoxFrame::PaintTitle(nsIPresContext* aPresContext,
fontMet->GetUnderline(offset, size);
if (decorations & NS_FONT_DECORATION_OVERLINE) {
aRenderingContext.SetColor(overColor);
aRenderingContext.FillRect(textRect.x, textRect.y, mRect.width, size);
aRenderingContext.FillRect(textRect.x, textRect.y, textRect.width, size);
}
if (decorations & NS_FONT_DECORATION_UNDERLINE) {
aRenderingContext.SetColor(underColor);
aRenderingContext.FillRect(textRect.x, textRect.y + baseline - offset, mRect.width, size);
aRenderingContext.FillRect(textRect.x, textRect.y + baseline - offset, textRect.width, size);
}
}
if (decorations & NS_FONT_DECORATION_LINE_THROUGH) {
fontMet->GetStrikeout(offset, size);
aRenderingContext.SetColor(strikeColor);
aRenderingContext.FillRect(textRect.x, textRect.y + baseline - offset, mRect.width, size);
aRenderingContext.FillRect(textRect.x, textRect.y + baseline - offset, textRect.width, size);
}
aRenderingContext.SetFont(fontStyle->mFont, nsnull);