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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 zoom_label_(NULL), | 392 zoom_label_(NULL), |
393 decrement_button_(NULL), | 393 decrement_button_(NULL), |
394 fullscreen_button_(NULL), | 394 fullscreen_button_(NULL), |
395 zoom_label_width_(0) { | 395 zoom_label_width_(0) { |
396 decrement_button_ = CreateButtonWithAccName( | 396 decrement_button_ = CreateButtonWithAccName( |
397 IDS_ZOOM_MINUS2, MenuButtonBackground::LEFT_BUTTON, decrement_index, | 397 IDS_ZOOM_MINUS2, MenuButtonBackground::LEFT_BUTTON, decrement_index, |
398 NULL, IDS_ACCNAME_ZOOM_MINUS2); | 398 NULL, IDS_ACCNAME_ZOOM_MINUS2); |
399 | 399 |
400 zoom_label_ = new Label( | 400 zoom_label_ = new Label( |
401 l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100)); | 401 l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100)); |
402 zoom_label_->SetColor(MenuConfig::instance().text_color); | 402 zoom_label_->set_auto_color_readability_enabled(false); |
| 403 zoom_label_->SetEnabledColor(MenuConfig::instance().text_color); |
403 zoom_label_->SetHorizontalAlignment(Label::ALIGN_RIGHT); | 404 zoom_label_->SetHorizontalAlignment(Label::ALIGN_RIGHT); |
404 MenuButtonBackground* center_bg = | 405 MenuButtonBackground* center_bg = |
405 new MenuButtonBackground(MenuButtonBackground::CENTER_BUTTON); | 406 new MenuButtonBackground(MenuButtonBackground::CENTER_BUTTON); |
406 zoom_label_->set_background(center_bg); | 407 zoom_label_->set_background(center_bg); |
407 zoom_label_->set_border(new MenuButtonBorder()); | 408 zoom_label_->set_border(new MenuButtonBorder()); |
408 zoom_label_->SetFont(MenuConfig::instance().font); | 409 zoom_label_->SetFont(MenuConfig::instance().font); |
409 AddChildView(zoom_label_); | 410 AddChildView(zoom_label_); |
410 zoom_label_width_ = MaxWidthForZoomLabel(); | 411 zoom_label_width_ = MaxWidthForZoomLabel(); |
411 | 412 |
412 increment_button_ = CreateButtonWithAccName( | 413 increment_button_ = CreateButtonWithAccName( |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 browser_->window()->GetNativeHandle()); | 862 browser_->window()->GetNativeHandle()); |
862 bookmark_menu_delegate_.reset( | 863 bookmark_menu_delegate_.reset( |
863 new BookmarkMenuDelegate(browser_->profile(), | 864 new BookmarkMenuDelegate(browser_->profile(), |
864 NULL, | 865 NULL, |
865 parent, | 866 parent, |
866 first_bookmark_command_id_)); | 867 first_bookmark_command_id_)); |
867 bookmark_menu_delegate_->Init( | 868 bookmark_menu_delegate_->Init( |
868 this, bookmark_menu_, model->bookmark_bar_node(), 0, | 869 this, bookmark_menu_, model->bookmark_bar_node(), 0, |
869 BookmarkMenuDelegate::SHOW_OTHER_FOLDER); | 870 BookmarkMenuDelegate::SHOW_OTHER_FOLDER); |
870 } | 871 } |
OLD | NEW |