Added the setting of the clip rect before drawing the button text

This commit is contained in:
rods%netscape.com 1999-07-28 21:37:22 +00:00
Родитель d8f155ad0c
Коммит 34a3503e8b
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -303,7 +303,10 @@ nsButtonControlFrame::Paint(nsIPresContext& aPresContext,
const nsStyleColor* colorStyle = (const nsStyleColor*)mStyleContext->GetStyleData(eStyleStruct_Color);
aRenderingContext.SetFont(fontStyle->mFont);
PRBool clipState;
aRenderingContext.PushState();
aRenderingContext.SetClipRect(rect, nsClipCombine_kIntersect, clipState);
// if disabled paint
if (PR_TRUE == mRenderer.isDisabled())
{
@ -317,6 +320,7 @@ nsButtonControlFrame::Paint(nsIPresContext& aPresContext,
aRenderingContext.SetColor(colorStyle->mColor);
aRenderingContext.DrawString(label, content.x, content.y);
aRenderingContext.PopState(clipState);
}
return NS_OK;