Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: chrome/browser/ui/views/toolbar/wrench_menu.cc

Issue 135003002: Make the apparance of pressed and hover state the same (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/wrench_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc
index 3bac99e814b607ac663dc0ea84712cc1613637c0..ffcbd868f2af809dfbe8f910c6f061aa99c52ab3 100644
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc
@@ -296,7 +296,8 @@ class MenuButtonBackground : public views::Background {
const views::View* view,
const gfx::Rect& bounds,
views::Button::ButtonState state) const {
- if (state == views::Button::STATE_HOVERED) {
+ if (state == views::Button::STATE_HOVERED ||
+ state == views::Button::STATE_PRESSED) {
view->GetNativeTheme()->Paint(canvas->sk_canvas(),
ui::NativeTheme::kMenuItemBackground,
ui::NativeTheme::kHovered,
@@ -648,10 +649,14 @@ class WrenchMenu::ZoomView : public WrenchMenuView {
fullscreen_button_->SetImage(ImageButton::STATE_NORMAL, full_screen_image);
SkColor fg_color = native_theme->GetSystemColor(
ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor);
+ gfx::ImageSkia hovered_fullscreen_image(
+ new HoveredImageSource(*full_screen_image, fg_color),
+ full_screen_image->size());
fullscreen_button_->SetImage(
- ImageButton::STATE_HOVERED,
- new gfx::ImageSkia(new HoveredImageSource(*full_screen_image, fg_color),
- full_screen_image->size()));
+ ImageButton::STATE_HOVERED, &hovered_fullscreen_image);
+ fullscreen_button_->SetImage(
+ ImageButton::STATE_PRESSED, &hovered_fullscreen_image);
+
SkColor enabled_text_color = native_theme->GetSystemColor(
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor);
zoom_label_->SetEnabledColor(enabled_text_color);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698