diff --git a/src/preferences/menu/ColorWindow.cpp b/src/preferences/menu/ColorWindow.cpp index 24ca11b5f0..a55a6c3b8a 100644 --- a/src/preferences/menu/ColorWindow.cpp +++ b/src/preferences/menu/ColorWindow.cpp @@ -61,7 +61,7 @@ ColorWindow::MessageReceived(BMessage *msg) get_menu_info(&info); info.background_color = colorPicker->ValueAsColor(); set_menu_info(&info); - be_app->PostMessage(UPDATE_WINDOW); + be_app->PostMessage(MENU_COLOR); break; default: diff --git a/src/preferences/menu/MenuBar.cpp b/src/preferences/menu/MenuBar.cpp index 6ae4f96a4e..058e1350fc 100644 --- a/src/preferences/menu/MenuBar.cpp +++ b/src/preferences/menu/MenuBar.cpp @@ -17,6 +17,7 @@ MenuBar::MenuBar() get_menu_info(&info); build_menu(); set_menu(); + SetItemMargins(14.0, 2.0, 20.0, 0.0); } @@ -149,5 +150,6 @@ MenuBar::Update() void MenuBar::FrameResized(float width, float height) { + Window()->ResizeTo(width + 80, height + 55); Window()->PostMessage(UPDATE_WINDOW); } diff --git a/src/preferences/menu/MenuWindow.cpp b/src/preferences/menu/MenuWindow.cpp index 346c26e02f..252b4e8d38 100644 --- a/src/preferences/menu/MenuWindow.cpp +++ b/src/preferences/menu/MenuWindow.cpp @@ -30,18 +30,18 @@ MenuWindow::MenuWindow(BRect rect) menuView->AddChild(menuBar); // resize the window according to the size of menuBar - ResizeTo((menuBar->Frame().right + 35), (menuBar->Frame().bottom + 45)); + ResizeTo((menuBar->Frame().right + 40), (menuBar->Frame().bottom + 45)); BRect menuBarFrame = menuBar->Frame(); BRect buttonFrame(menuBarFrame.left, menuBarFrame.bottom + 10, menuBarFrame.left + 75, menuBarFrame.bottom + 30); defaultButton = new BButton(buttonFrame, "Default", "Defaults", new BMessage(MENU_DEFAULT), - B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE); + 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); + B_FOLLOW_H_CENTER | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE); revertButton->SetEnabled(false); menuView->AddChild(revertButton); @@ -152,8 +152,9 @@ MenuWindow::MessageReceived(BMessage *msg) break; case MENU_COLOR: - set_menu_info(&info); - (new BAlert("test","we made it","cool"))->Go(); + get_menu_info(&info); + revert = true; + Update(); break; default: