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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user