From d055b93b25ba69743749309ac615cef8cc443e02 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 22 Apr 2014 19:38:43 -0400 Subject: [PATCH] BMenuField: Replace 5 with DefaultLabelSpacing() --- src/kits/interface/MenuField.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/MenuField.cpp b/src/kits/interface/MenuField.cpp index 0a5fb8dcb5..eb53930914 100644 --- a/src/kits/interface/MenuField.cpp +++ b/src/kits/interface/MenuField.cpp @@ -974,8 +974,10 @@ BMenuField::DoLayout() // We have valid layout items, they define the divider location. divider = fLayoutData->menu_bar_layout_item->Frame().left - fLayoutData->label_layout_item->Frame().left; - } else if (fLayoutData->label_width > 0) - divider = fLayoutData->label_width + 5; + } else if (fLayoutData->label_width > 0) { + divider = fLayoutData->label_width + + be_control_look->DefaultLabelSpacing(); + } // menu bar BRect dirty(fMenuBar->Frame()); @@ -1295,8 +1297,10 @@ BMenuField::_ValidateLayoutData() // compute the minimal divider float divider = 0; - if (fLayoutData->label_width > 0) - divider = fLayoutData->label_width + 5; + if (fLayoutData->label_width > 0) { + divider = fLayoutData->label_width + + be_control_look->DefaultLabelSpacing(); + } // If we shan't do real layout, we let the current divider take influence. if ((Flags() & B_SUPPORTS_LAYOUT) == 0) @@ -1430,7 +1434,8 @@ BMenuField::LabelLayoutItem::BaseMinSize() if (fParent->Label() == NULL) 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); }