Chart: tweak menu field widths. Don't ResizeToPreferred()

This commit is contained in:
John Scipione 2013-05-30 00:01:33 -04:00
parent f6d98e7b75
commit e9c1c3b70b

View File

@ -58,9 +58,9 @@ enum {
H_BORDER = 5, H_BORDER = 5,
V_BORDER = 2, V_BORDER = 2,
ANIM_LABEL = 52, ANIM_LABEL = 52,
ANIM_POPUP = 42, ANIM_POPUP = 125,
DISP_LABEL = 40, DISP_LABEL = 40,
DISP_POPUP = 42, DISP_POPUP = 122,
BUTTON_WIDTH = 50, BUTTON_WIDTH = 50,
BUTTON_OFFSET = -100, BUTTON_OFFSET = -100,
SPACE_LABEL = 40, SPACE_LABEL = 40,
@ -518,12 +518,10 @@ ChartWindow::ChartWindow(BRect frame, const char *name)
popup->SetFont(&font); popup->SetFont(&font);
popup->MenuBar()->SetFont(&font); popup->MenuBar()->SetFont(&font);
popup->Menu()->SetFont(&font); popup->Menu()->SetFont(&font);
popup->ResizeToPreferred();
popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f); popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f);
fTopView->AddChild(popup); fTopView->AddChild(popup);
h += ANIM_LABEL + ANIM_POPUP + h += ANIM_LABEL + ANIM_POPUP + H_BORDER;
popup->StringWidth(B_TRANSLATE("Slow rotation"));
/* display mode popup */ /* display mode popup */
menu = new BPopUpMenu(B_TRANSLATE("Off")); menu = new BPopUpMenu(B_TRANSLATE("Off"));
@ -551,12 +549,10 @@ ChartWindow::ChartWindow(BRect frame, const char *name)
popup->SetFont(&font); popup->SetFont(&font);
popup->MenuBar()->SetFont(&font); popup->MenuBar()->SetFont(&font);
popup->Menu()->SetFont(&font); popup->Menu()->SetFont(&font);
popup->ResizeToPreferred();
popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f); popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f);
fTopView->AddChild(popup); fTopView->AddChild(popup);
h += DISP_LABEL + DISP_POPUP + h += DISP_LABEL + DISP_POPUP + H_BORDER;
popup->StringWidth(B_TRANSLATE("DirectWindow")) + H_BORDER;
/* create the offwindow (invisible) button on the left side. /* create the offwindow (invisible) button on the left side.
this will be used to record the content of the Picture this will be used to record the content of the Picture