Fix building on Linux

This commit is contained in:
Cheng Zhao 2014-10-13 11:03:56 +08:00
parent 9e87037d34
commit 69a89303d0
4 changed files with 6 additions and 8 deletions

View file

@ -17,14 +17,13 @@ MenuViews::MenuViews() {
void MenuViews::Popup(Window* window) { void MenuViews::Popup(Window* window) {
gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint(); gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
views::MenuRunner menu_runner(model()); views::MenuRunner menu_runner(model(), views::MenuRunner::CONTEXT_MENU);
ignore_result(menu_runner.RunMenuAt( ignore_result(menu_runner.RunMenuAt(
static_cast<NativeWindowViews*>(window->window())->widget(), static_cast<NativeWindowViews*>(window->window())->widget(),
NULL, NULL,
gfx::Rect(cursor, gfx::Size()), gfx::Rect(cursor, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT, views::MENU_ANCHOR_TOPLEFT,
ui::MENU_SOURCE_MOUSE, ui::MENU_SOURCE_MOUSE));
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU));
} }
// static // static

View file

@ -145,7 +145,7 @@ MessageDialog::MessageDialog(NativeWindow* parent_window,
views::LabelButton* button = new views::LabelButton( views::LabelButton* button = new views::LabelButton(
this, base::UTF8ToUTF16(buttons[i])); this, base::UTF8ToUTF16(buttons[i]));
button->set_tag(i); button->set_tag(i);
button->set_min_size(gfx::Size(60, 30)); button->SetMinSize(gfx::Size(60, 30));
button->SetStyle(views::Button::STYLE_BUTTON); button->SetStyle(views::Button::STYLE_BUTTON);
button->SetGroup(kButtonGroup); button->SetGroup(kButtonGroup);

View file

@ -35,14 +35,13 @@ void MenuDelegate::RunMenu(ui::MenuModel* model, views::MenuButton* button) {
id_ = button->tag(); id_ = button->tag();
views::MenuItemView* item = BuildMenu(model); views::MenuItemView* item = BuildMenu(model);
views::MenuRunner menu_runner(item); views::MenuRunner menu_runner(item, views::MenuRunner::CONTEXT_MENU);
ignore_result(menu_runner.RunMenuAt( ignore_result(menu_runner.RunMenuAt(
button->GetWidget()->GetTopLevelWidget(), button->GetWidget()->GetTopLevelWidget(),
button, button,
bounds, bounds,
views::MENU_ANCHOR_TOPRIGHT, views::MENU_ANCHOR_TOPRIGHT,
ui::MENU_SOURCE_MOUSE, ui::MENU_SOURCE_MOUSE));
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU));
} }
views::MenuItemView* MenuDelegate::BuildMenu(ui::MenuModel* model) { views::MenuItemView* MenuDelegate::BuildMenu(ui::MenuModel* model) {

2
vendor/brightray vendored

@ -1 +1 @@
Subproject commit bb1e4f06960e7f1a777a7709684ec69a10a85cc7 Subproject commit 319c63da618f5fdff38f6a65c452f3802b8756d1