Opened 13 years ago

Closed 13 years ago

Last modified 13 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:
Has a Patch: no 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@… 13 years ago.
before menu color
menu2.png (25.6 KB) - added by bxi07354@… 13 years ago.
before change font size
menu1.a.png (25.7 KB) - added by bxi07354@… 13 years ago.
after menu color
menu2.a.png (30.9 KB) - added by bxi07354@… 13 years ago.
after change font size

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 years ago by bxi07354@…

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 Changed 13 years ago by bxi07354@…

BMenuBar doesn't do SetItemMargins.

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

Changed 13 years ago by bxi07354@…

Attachment: menu1.png added

before menu color

Changed 13 years ago by bxi07354@…

Attachment: menu2.png added

before change font size

Changed 13 years ago by bxi07354@…

Attachment: menu1.a.png added

after menu color

Changed 13 years ago by bxi07354@…

Attachment: menu2.a.png added

after change font size

comment:3 Changed 13 years ago by jackburton

Resolution: fixed

comment:4 Changed 13 years ago by jackburton

Applied in hrev16963

comment:5 Changed 13 years ago by jackburton

Status: newclosed

comment:6 Changed 13 years ago by bxi07354@…

Thanks.

Note: See TracTickets for help on using tickets.