BMenuField: Replace 5 with DefaultLabelSpacing()
This commit is contained in:
@@ -974,8 +974,10 @@ BMenuField::DoLayout()
|
|||||||
// We have valid layout items, they define the divider location.
|
// We have valid layout items, they define the divider location.
|
||||||
divider = fLayoutData->menu_bar_layout_item->Frame().left
|
divider = fLayoutData->menu_bar_layout_item->Frame().left
|
||||||
- fLayoutData->label_layout_item->Frame().left;
|
- fLayoutData->label_layout_item->Frame().left;
|
||||||
} else if (fLayoutData->label_width > 0)
|
} else if (fLayoutData->label_width > 0) {
|
||||||
divider = fLayoutData->label_width + 5;
|
divider = fLayoutData->label_width
|
||||||
|
+ be_control_look->DefaultLabelSpacing();
|
||||||
|
}
|
||||||
|
|
||||||
// menu bar
|
// menu bar
|
||||||
BRect dirty(fMenuBar->Frame());
|
BRect dirty(fMenuBar->Frame());
|
||||||
@@ -1295,8 +1297,10 @@ BMenuField::_ValidateLayoutData()
|
|||||||
|
|
||||||
// compute the minimal divider
|
// compute the minimal divider
|
||||||
float divider = 0;
|
float divider = 0;
|
||||||
if (fLayoutData->label_width > 0)
|
if (fLayoutData->label_width > 0) {
|
||||||
divider = fLayoutData->label_width + 5;
|
divider = fLayoutData->label_width
|
||||||
|
+ be_control_look->DefaultLabelSpacing();
|
||||||
|
}
|
||||||
|
|
||||||
// If we shan't do real layout, we let the current divider take influence.
|
// If we shan't do real layout, we let the current divider take influence.
|
||||||
if ((Flags() & B_SUPPORTS_LAYOUT) == 0)
|
if ((Flags() & B_SUPPORTS_LAYOUT) == 0)
|
||||||
@@ -1430,7 +1434,8 @@ BMenuField::LabelLayoutItem::BaseMinSize()
|
|||||||
if (fParent->Label() == NULL)
|
if (fParent->Label() == NULL)
|
||||||
return BSize(-1, -1);
|
return BSize(-1, -1);
|
||||||
|
|
||||||
return BSize(fParent->fLayoutData->label_width + 5,
|
return BSize(fParent->fLayoutData->label_width
|
||||||
|
+ be_control_look->DefaultLabelSpacing(),
|
||||||
fParent->fLayoutData->label_height);
|
fParent->fLayoutData->label_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user