riched20: Fill the selection bar.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a19cecacda
commit
93b6348779
|
@ -32,6 +32,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
ME_Cell *cell;
|
ME_Cell *cell;
|
||||||
int ys, ye;
|
int ys, ye;
|
||||||
HRGN oldRgn;
|
HRGN oldRgn;
|
||||||
|
RECT rc;
|
||||||
HBRUSH brush = CreateSolidBrush( ITextHost_TxGetSysColor( editor->texthost, COLOR_WINDOW ) );
|
HBRUSH brush = CreateSolidBrush( ITextHost_TxGetSysColor( editor->texthost, COLOR_WINDOW ) );
|
||||||
|
|
||||||
ME_InitContext( &c, editor, hDC );
|
ME_InitContext( &c, editor, hDC );
|
||||||
|
@ -73,21 +74,24 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
|
||||||
para = para_next( para );
|
para = para_next( para );
|
||||||
}
|
}
|
||||||
if (c.pt.y + editor->nTotalLength < c.rcView.bottom)
|
if (c.pt.y + editor->nTotalLength < c.rcView.bottom)
|
||||||
{
|
{ /* space after the end of the text */
|
||||||
/* Fill space after the end of the text. */
|
|
||||||
RECT rc;
|
|
||||||
rc.top = c.pt.y + editor->nTotalLength;
|
rc.top = c.pt.y + editor->nTotalLength;
|
||||||
rc.left = c.rcView.left;
|
rc.left = c.rcView.left;
|
||||||
rc.bottom = c.rcView.bottom;
|
rc.bottom = c.rcView.bottom;
|
||||||
rc.right = c.rcView.right;
|
rc.right = c.rcView.right;
|
||||||
|
if (IntersectRect( &rc, &rc, rcUpdate ))
|
||||||
IntersectRect(&rc, &rc, rcUpdate);
|
|
||||||
|
|
||||||
if (!IsRectEmpty(&rc))
|
|
||||||
PatBlt(hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY);
|
PatBlt(hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY);
|
||||||
}
|
}
|
||||||
if (editor->nTotalLength != editor->nLastTotalLength ||
|
if (editor->selofs)
|
||||||
editor->nTotalWidth != editor->nLastTotalWidth)
|
{ /* selection bar */
|
||||||
|
rc.left = c.rcView.left - editor->selofs;
|
||||||
|
rc.top = c.rcView.top;
|
||||||
|
rc.right = c.rcView.left;
|
||||||
|
rc.bottom = c.rcView.bottom;
|
||||||
|
if (IntersectRect( &rc, &rc, rcUpdate ))
|
||||||
|
PatBlt( hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
|
||||||
|
}
|
||||||
|
if (editor->nTotalLength != editor->nLastTotalLength || editor->nTotalWidth != editor->nLastTotalWidth)
|
||||||
ME_SendRequestResize(editor, FALSE);
|
ME_SendRequestResize(editor, FALSE);
|
||||||
editor->nLastTotalLength = editor->nTotalLength;
|
editor->nLastTotalLength = editor->nTotalLength;
|
||||||
editor->nLastTotalWidth = editor->nTotalWidth;
|
editor->nLastTotalWidth = editor->nTotalWidth;
|
||||||
|
|
Loading…
Reference in New Issue