BOptionPopUp: build fix.

This commit is contained in:
Adrien Destugues 2014-11-26 09:48:57 +01:00
parent d47ada16bc
commit c278afdec1

View File

@ -194,7 +194,7 @@ BOptionPopUp::AllAttached()
if (menu != NULL) {
float labelWidth = fMenuField->StringWidth(fMenuField->Label());
if (labelWidth > 0.f)
labelWidth += kLabelSapce;
labelWidth += kLabelSpace;
fMenuField->SetDivider(labelWidth);
menu->SetTargetForItems(this);
}
@ -219,7 +219,9 @@ BOptionPopUp::SetLabel(const char* text)
// We are not sure the menu can keep the whole
// string as label, so we check against the current label
float newWidth = fMenuField->StringWidth(fMenuField->Label());
fMenuField->SetDivider(newWidth + kLabelSpace);
if (newWidth > 0.f)
newWidth += kLabelSpace;
fMenuField->SetDivider(newWidth);
}