Fix case label coding style violations...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29688 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-03-25 00:02:20 +00:00
parent fde6bf44b1
commit 2ce5b17258
1 changed files with 20 additions and 20 deletions

View File

@ -1572,29 +1572,29 @@ BControlLook::DrawLabel(BView* view, const char* label, BRect rect,
switch (alignment.horizontal) {
default:
case B_ALIGN_LEFT:
location.x = rect.left;
break;
case B_ALIGN_RIGHT:
location.x = rect.right - width;
break;
case B_ALIGN_CENTER:
location.x = (rect.left + rect.right - width) / 2.0f;
break;
case B_ALIGN_LEFT:
location.x = rect.left;
break;
case B_ALIGN_RIGHT:
location.x = rect.right - width;
break;
case B_ALIGN_CENTER:
location.x = (rect.left + rect.right - width) / 2.0f;
break;
}
switch (alignment.vertical) {
case B_ALIGN_TOP:
location.y = rect.top + ceilf(fontHeight.ascent);
break;
default:
case B_ALIGN_MIDDLE:
location.y = floorf((rect.top + rect.bottom - height) / 2.0f + 0.5f)
+ ceilf(fontHeight.ascent);
break;
case B_ALIGN_BOTTOM:
location.y = rect.bottom - ceilf(fontHeight.descent);
break;
case B_ALIGN_TOP:
location.y = rect.top + ceilf(fontHeight.ascent);
break;
default:
case B_ALIGN_MIDDLE:
location.y = floorf((rect.top + rect.bottom - height) / 2.0f + 0.5f)
+ ceilf(fontHeight.ascent);
break;
case B_ALIGN_BOTTOM:
location.y = rect.bottom - ceilf(fontHeight.descent);
break;
}
view->DrawString(truncatedLabel.String(), location);