toItemContentRect() -> toCellContentRect() (consistency)

This commit is contained in:
Pietro Gagliardi 2014-12-20 21:10:44 -05:00
parent 3cb96de162
commit 89fb2e8c6c
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ static BOOL rowColumnToClientRect(struct table *t, struct rowcol rc, RECT *r)
// TODO idealCoordToRowColumn/rowColumnToIdealCoord?
static void toItemContentRect(struct table *t, RECT *r, LRESULT xoff, intptr_t width, intptr_t height)
static void toCellContentRect(struct table *t, RECT *r, LRESULT xoff, intptr_t width, intptr_t height)
{
if (xoff == 0)
xoff = SendMessageW(t->header, HDM_GETBITMAPMARGIN, 0, 0);
@ -161,4 +161,4 @@ static void toItemContentRect(struct table *t, RECT *r, LRESULT xoff, intptr_t w
r->bottom = r->top + height;
}
#define toCheckboxRect(t, r) toItemContentRect(t, r, 0, t->checkboxWidth, t->checkboxHeight)
#define toCheckboxRect(t, r) toCellContentRect(t, r, 0, t->checkboxWidth, t->checkboxHeight)

View File

@ -44,7 +44,7 @@ static void drawCell(struct table *t, HDC dc, struct drawCellParams *p)
switch (t->columnTypes[p->column]) {
case tableColumnText:
case tableColumnImage: // TODO
toItemContentRect(t, &r, p->xoff, 0, 0); // TODO get the text height
toCellContentRect(t, &r, p->xoff, 0, 0); // TODO get the text height
if (SetTextColor(dc, GetSysColor(textColor)) == CLR_INVALID)
panic("error setting Table cell text color");
if (SetBkMode(dc, TRANSPARENT) == 0)