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

Side by Side Diff: chrome/browser/ui/views/profile_chooser_view.cc

Issue 166273005: Fix ProfileChooserView button color regression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profile_chooser_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile_info_util.h" 9 #include "chrome/browser/profiles/profile_info_util.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SetImage(STATE_NORMAL, normal_icon); 117 SetImage(STATE_NORMAL, normal_icon);
118 SetImage(STATE_HOVERED, hover_icon); 118 SetImage(STATE_HOVERED, hover_icon);
119 SetImage(STATE_PRESSED, hover_icon); 119 SetImage(STATE_PRESSED, hover_icon);
120 SetTextColor(STATE_HOVERED, GetNativeTheme()->GetSystemColor( 120 SetTextColor(STATE_HOVERED, GetNativeTheme()->GetSystemColor(
121 ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor)); 121 ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor));
122 } 122 }
123 123
124 BackgroundColorHoverButton::~BackgroundColorHoverButton() {} 124 BackgroundColorHoverButton::~BackgroundColorHoverButton() {}
125 125
126 void BackgroundColorHoverButton::OnPaint(gfx::Canvas* canvas) { 126 void BackgroundColorHoverButton::OnPaint(gfx::Canvas* canvas) {
127 if ((state() == STATE_PRESSED) || (state() == STATE_HOVERED) || HasFocus()) 127 if ((state() == STATE_PRESSED) || (state() == STATE_HOVERED) || HasFocus()) {
128 canvas->DrawColor(ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor); 128 canvas->DrawColor(GetNativeTheme()->GetSystemColor(
129 ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor));
130 }
129 LabelButton::OnPaint(canvas); 131 LabelButton::OnPaint(canvas);
130 } 132 }
131 133
132 } // namespace 134 } // namespace
133 135
134 136
135 // EditableProfilePhoto ------------------------------------------------- 137 // EditableProfilePhoto -------------------------------------------------
136 138
137 // A custom Image control that shows a "change" button when moused over. 139 // A custom Image control that shows a "change" button when moused over.
138 class EditableProfilePhoto : public views::ImageView { 140 class EditableProfilePhoto : public views::ImageView {
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 if (!is_primary_account) { 817 if (!is_primary_account) {
816 email_button->set_menu_marker(menu_marker); 818 email_button->set_menu_marker(menu_marker);
817 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 819 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
818 } 820 }
819 layout->StartRow(1, 0); 821 layout->StartRow(1, 0);
820 layout->AddView(email_button); 822 layout->AddView(email_button);
821 823
822 // Save the original email address, as the button text could be elided. 824 // Save the original email address, as the button text could be elided.
823 current_profile_accounts_map_[email_button] = account; 825 current_profile_accounts_map_[email_button] = account;
824 } 826 }
OLDNEW
« 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