Draw the label right at origin in B_ALIGN_LEFT mode. Should improve alignment

with other controls. (BTextControl patch with the same change is upcomming, but
it includes many other changes I didn't want to mix in.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24100 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-02-24 20:25:17 +00:00
parent c8d785a71d
commit 35b450cd25

View File

@ -790,15 +790,15 @@ BMenuField::DrawLabel(BRect bounds, BRect update)
float x;
switch (fAlign) {
case B_ALIGN_RIGHT:
x = fDivider - fLayoutData->label_width - 3.0f;
x = fDivider - fLayoutData->label_width - 3.0;
break;
case B_ALIGN_CENTER:
x = fDivider - fLayoutData->label_width / 2.0f;
x = fDivider - fLayoutData->label_width / 2.0;
break;
default:
x = 3.0f;
x = 0.0;
break;
}