Use correct background color for the whole richedit control.
This commit is contained in:
parent
bd8026ca9d
commit
cd80c487f5
|
@ -77,22 +77,18 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, RECT *rcUpda
|
||||||
ye = rcUpdate->bottom;
|
ye = rcUpdate->bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.left = xs; /* FIXME remove if it's not necessary anymore */
|
|
||||||
rc.top = c.pt.y;
|
|
||||||
rc.right = xe;
|
|
||||||
rc.bottom = c.pt.y+1;
|
|
||||||
FillRect(hDC, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
|
|
||||||
|
|
||||||
if (ys == c.pt.y) /* don't overwrite the top bar */
|
|
||||||
ys++;
|
|
||||||
if (ye>ys) {
|
if (ye>ys) {
|
||||||
|
HBRUSH hbr;
|
||||||
|
hbr = CreateSolidBrush(ME_GetBackColor(c.editor));
|
||||||
rc.left = xs;
|
rc.left = xs;
|
||||||
rc.top = ys;
|
rc.top = ys;
|
||||||
rc.right = xe;
|
rc.right = xe;
|
||||||
rc.bottom = ye;
|
rc.bottom = ye;
|
||||||
/* this is not supposed to be gray, I know, but lets keep it gray for now for debugging purposes */
|
FillRect(hDC, &rc, hbr);
|
||||||
FillRect(hDC, &rc, (HBRUSH)GetStockObject(LTGRAY_BRUSH));
|
DeleteObject(hbr);
|
||||||
}
|
}
|
||||||
|
if (ys == c.pt.y) /* don't overwrite the top bar */
|
||||||
|
ys++;
|
||||||
}
|
}
|
||||||
editor->nLastTotalLength = editor->nTotalLength;
|
editor->nLastTotalLength = editor->nTotalLength;
|
||||||
ME_DestroyContext(&c);
|
ME_DestroyContext(&c);
|
||||||
|
|
Loading…
Reference in New Issue