OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/wrench_menu.h" | 5 #include "chrome/browser/ui/views/wrench_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 zoom_label_(NULL), | 393 zoom_label_(NULL), |
394 decrement_button_(NULL), | 394 decrement_button_(NULL), |
395 fullscreen_button_(NULL), | 395 fullscreen_button_(NULL), |
396 zoom_label_width_(0) { | 396 zoom_label_width_(0) { |
397 decrement_button_ = CreateButtonWithAccName( | 397 decrement_button_ = CreateButtonWithAccName( |
398 IDS_ZOOM_MINUS2, MenuButtonBackground::LEFT_BUTTON, decrement_index, | 398 IDS_ZOOM_MINUS2, MenuButtonBackground::LEFT_BUTTON, decrement_index, |
399 NULL, IDS_ACCNAME_ZOOM_MINUS2); | 399 NULL, IDS_ACCNAME_ZOOM_MINUS2); |
400 | 400 |
401 zoom_label_ = new Label( | 401 zoom_label_ = new Label( |
402 l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100)); | 402 l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100)); |
403 zoom_label_->SetColor(MenuConfig::instance().text_color); | 403 zoom_label_->SetAutoColorReadabilityEnabled(false); |
| 404 zoom_label_->SetEnabledColor(MenuConfig::instance().text_color); |
404 zoom_label_->SetHorizontalAlignment(Label::ALIGN_RIGHT); | 405 zoom_label_->SetHorizontalAlignment(Label::ALIGN_RIGHT); |
405 MenuButtonBackground* center_bg = | 406 MenuButtonBackground* center_bg = |
406 new MenuButtonBackground(MenuButtonBackground::CENTER_BUTTON); | 407 new MenuButtonBackground(MenuButtonBackground::CENTER_BUTTON); |
407 zoom_label_->set_background(center_bg); | 408 zoom_label_->set_background(center_bg); |
408 zoom_label_->set_border(new MenuButtonBorder()); | 409 zoom_label_->set_border(new MenuButtonBorder()); |
409 zoom_label_->SetFont(MenuConfig::instance().font); | 410 zoom_label_->SetFont(MenuConfig::instance().font); |
410 AddChildView(zoom_label_); | 411 AddChildView(zoom_label_); |
411 zoom_label_width_ = MaxWidthForZoomLabel(); | 412 zoom_label_width_ = MaxWidthForZoomLabel(); |
412 | 413 |
413 increment_button_ = CreateButtonWithAccName( | 414 increment_button_ = CreateButtonWithAccName( |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 browser_->window()->GetNativeHandle()); | 880 browser_->window()->GetNativeHandle()); |
880 bookmark_menu_delegate_.reset( | 881 bookmark_menu_delegate_.reset( |
881 new BookmarkMenuDelegate(browser_->profile(), | 882 new BookmarkMenuDelegate(browser_->profile(), |
882 NULL, | 883 NULL, |
883 parent, | 884 parent, |
884 first_bookmark_command_id_)); | 885 first_bookmark_command_id_)); |
885 bookmark_menu_delegate_->Init( | 886 bookmark_menu_delegate_->Init( |
886 this, bookmark_menu_, model->bookmark_bar_node(), 0, | 887 this, bookmark_menu_, model->bookmark_bar_node(), 0, |
887 BookmarkMenuDelegate::SHOW_OTHER_FOLDER); | 888 BookmarkMenuDelegate::SHOW_OTHER_FOLDER); |
888 } | 889 } |
OLD | NEW |