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

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

Issue 8872029: Revert 113634 - Add support for high contrast mode to bubbles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | ui/views/bubble/bubble_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 void ProfileItemView::OnBlur() { 283 void ProfileItemView::OnBlur() {
284 views::CustomButton::OnBlur(); 284 views::CustomButton::OnBlur();
285 OnFocusStateChanged(false); 285 OnFocusStateChanged(false);
286 } 286 }
287 287
288 void ProfileItemView::OnHighlightStateChanged() { 288 void ProfileItemView::OnHighlightStateChanged() {
289 set_background(IsHighlighted() ? views::Background::CreateSolidBackground( 289 set_background(IsHighlighted() ? views::Background::CreateSolidBackground(
290 SkColorSetRGB(0xe3, 0xed, 0xf6)) : NULL); 290 SkColorSetRGB(0xe3, 0xed, 0xf6)) : NULL);
291 SkColor background_color = background() ?
292 background()->get_color() : views::BubbleDelegateView::kBackgroundColor;
293 name_label_->SetBackgroundColor(background_color);
294 sync_state_label_->SetBackgroundColor(background_color);
295 edit_link_->SetBackgroundColor(background_color);
296 291
297 bool show_edit = IsHighlighted() && item_.active; 292 bool show_edit = IsHighlighted() && item_.active;
298 sync_state_label_->SetVisible(!show_edit); 293 sync_state_label_->SetVisible(!show_edit);
299 edit_link_->SetVisible(show_edit); 294 edit_link_->SetVisible(show_edit);
300 SchedulePaint(); 295 SchedulePaint();
301 } 296 }
302 297
303 void ProfileItemView::OnFocusStateChanged(bool has_focus) { 298 void ProfileItemView::OnFocusStateChanged(bool has_focus) {
304 if (!has_focus && state() != views::CustomButton::BS_DISABLED) 299 if (!has_focus && state() != views::CustomButton::BS_DISABLED)
305 SetState(views::CustomButton::BS_NORMAL); 300 SetState(views::CustomButton::BS_NORMAL);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 item_views_.push_back(item_view); 481 item_views_.push_back(item_view);
487 } 482 }
488 483
489 separator_ = new views::Separator(); 484 separator_ = new views::Separator();
490 AddChildView(separator_); 485 AddChildView(separator_);
491 486
492 add_profile_link_ = new views::Link( 487 add_profile_link_ = new views::Link(
493 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); 488 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK));
494 add_profile_link_->set_listener(this); 489 add_profile_link_->set_listener(this);
495 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 490 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
496 add_profile_link_->SetBackgroundColor(color());
497 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); 491 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6));
498 AddChildView(add_profile_link_); 492 AddChildView(add_profile_link_);
499 493
500 PreferredSizeChanged(); 494 PreferredSizeChanged();
501 } 495 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/bubble/bubble_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698