Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#370 closed bug (fixed)

menu color and resize and Arrangement of button

Reported by: bxi07354@… Owned by: jackburton
Priority: normal Milestone: R1
Component: Preferences Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

menu color ---------------------------------

ColorWindow.cpp ColorWindow::MessageReceived(BMessage *msg)

case MENU_COLOR:

get_menu_info(&info); info.background_color = colorPicker->ValueAsColor(); set_menu_info(&info);

  • be_app->PostMessage(UPDATE_WINDOW);

+ be_app->PostMessage(MENU_COLOR);

break;

MenuWindow.cpp MenuWindow::MessageReceived(BMessage *msg)

case MENU_COLOR:

  • set_menu_info(&info);

+ get_menu_info(&info); + revert = true; + Update();

break;

Resize --------------------------------------

MenuWindow.cpp MenuWindow::MenuWindow(BRect rect)

  • ResizeTo((menuBar->Frame().right + 35), (menuBar->Frame().bottom + 45));

+ ResizeTo((menuBar->Frame().right + 40), (menuBar->Frame().bottom + 45));

MenuBar.cpp MenuBar::FrameResized(float width, float height)

+ Window()->ResizeTo(width+80, height+55);

Arrangement of button --------------------------

MenuWindow.cpp MenuWindow::MenuWindow(BRect rect)

  • defaultButton = new BButton(buttonFrame, "Default", "Defaults", new

BMessage(MENU_DEFAULT),

B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);

+ defaultButton = new BButton(buttonFrame, "Default", "Defaults", new BMessage(MENU_DEFAULT),

B_FOLLOW_H_CENTER | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);

menuView->AddChild(defaultButton);

buttonFrame.OffsetBy(buttonFrame.Width() + 20, 0);

  • revertButton = new BButton(buttonFrame, "Revert", "Revert", new

BMessage(MENU_REVERT),

B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);

+ revertButton = new BButton(buttonFrame, "Revert", "Revert", new BMessage(MENU_REVERT),

B_FOLLOW_H_CENTER | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);

Attachments (4)

menu1.png (25.7 KB ) - added by bxi07354@… 18 years ago.
before menu color
menu2.png (25.6 KB ) - added by bxi07354@… 18 years ago.
before change font size
menu1.a.png (25.7 KB ) - added by bxi07354@… 18 years ago.
after menu color
menu2.a.png (30.9 KB ) - added by bxi07354@… 18 years ago.
after change font size

Download all attachments as: .zip

Change History (10)

comment:1 by bxi07354@…, 18 years ago

BMenuBar doesn't do SetItemMargins.

MenuBar.cpp MenuBar::MenuBar()

:BMenuBar(BRect(40,10,10,10), "menu", B_FOLLOW_TOP|B_FRAME_EVENTS,

B_ITEMS_IN_COLUMN, true) {

get_menu_info(&info); build_menu(); set_menu();

+ SetItemMargins(14.0, 2.0, 20.0, 0.0); }

comment:2 by bxi07354@…, 18 years ago

BMenuBar doesn't do SetItemMargins.

Sorry. It was InitData(). However, it is small.

by bxi07354@…, 18 years ago

Attachment: menu1.png added

before menu color

by bxi07354@…, 18 years ago

Attachment: menu2.png added

before change font size

by bxi07354@…, 18 years ago

Attachment: menu1.a.png added

after menu color

by bxi07354@…, 18 years ago

Attachment: menu2.a.png added

after change font size

comment:3 by jackburton, 18 years ago

Resolution: fixed

comment:4 by jackburton, 18 years ago

Applied in hrev16963

comment:5 by jackburton, 18 years ago

Status: newclosed

comment:6 by bxi07354@…, 18 years ago

Thanks.

Note: See TracTickets for help on using tickets.