Make the caret use InvetRect for drawing.

This commit is contained in:
sfraser%netscape.com 1999-08-09 19:14:43 +00:00
parent 3979d88e03
commit 953e2971e4
2 changed files with 8 additions and 18 deletions

View File

@ -560,17 +560,12 @@ void nsCaret::DrawCaretWithContext(nsIRenderingContext& inRendContext)
frameRect.width = mCaretWidth;
mCaretRect = frameRect;
if (mDrawn)
{
/*
if (mReadOnly)
inRendContext.SetColor(NS_RGB(85, 85, 85)); // we are drawing it; gray
else
inRendContext.SetColor(NS_RGB(0, 0, 0)); // we are drawing it; black
}
else
inRendContext.SetColor(NS_RGB(255, 255, 255)); // we are erasing it; white
inRendContext.FillRect(mCaretRect);
*/
inRendContext.InvertRect(mCaretRect);
}
PRBool dummy;

View File

@ -560,17 +560,12 @@ void nsCaret::DrawCaretWithContext(nsIRenderingContext& inRendContext)
frameRect.width = mCaretWidth;
mCaretRect = frameRect;
if (mDrawn)
{
/*
if (mReadOnly)
inRendContext.SetColor(NS_RGB(85, 85, 85)); // we are drawing it; gray
else
inRendContext.SetColor(NS_RGB(0, 0, 0)); // we are drawing it; black
}
else
inRendContext.SetColor(NS_RGB(255, 255, 255)); // we are erasing it; white
inRendContext.FillRect(mCaretRect);
*/
inRendContext.InvertRect(mCaretRect);
}
PRBool dummy;