Tracker: center text horizontally again

We alwasys draw text at the bottom of the calculated TextWidget
rect, that's why it needed to be centered to get the desired
placement. However, there is two places
This commit is contained in:
John Scipione 2018-07-04 16:35:06 -07:00
parent 6b9353b4a3
commit 6fdf2dd2b3

View File

@ -134,7 +134,8 @@ BTextWidget::ColumnRect(BPoint poseLoc, const BColumn* column,
BRect result;
result.left = column->Offset() + poseLoc.x;
result.right = result.left + column->Width();
result.bottom = poseLoc.y + view->ListElemHeight() - 1;
result.bottom = poseLoc.y
+ roundf((view->ListElemHeight() + view->FontHeight()) / 2);
result.top = result.bottom - view->FontHeight();
return result;
}
@ -175,7 +176,8 @@ BTextWidget::CalcRectCommon(BPoint poseLoc, const BColumn* column,
break;
}
result.bottom = poseLoc.y + (view->ListElemHeight() - 1);
result.bottom = poseLoc.y
+ roundf((view->ListElemHeight() + view->FontHeight()) / 2);
} else {
if (view->ViewMode() == kIconMode) {
// large/scaled icon mode