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