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:
parent
b8230c0e68
commit
838b14eeb3
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user