Make the caret use InvetRect for drawing.

git-svn-id: svn://10.0.0.236/trunk@42779 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com 1999-08-09 19:14:43 +00:00
parent b8230c0e68
commit 838b14eeb3
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;