diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 21:16:56 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 21:16:56 +0000 |
commit | 22d90237949a084974b59c5479bb44e08ef9f443 (patch) | |
tree | 9def3735d90fc8330306019ef054507a8614ffbb | |
parent | 2040e30fc671f33cd42716dc32957bbbef54321b (diff) | |
download | chromium_src-22d90237949a084974b59c5479bb44e08ef9f443.zip chromium_src-22d90237949a084974b59c5479bb44e08ef9f443.tar.gz chromium_src-22d90237949a084974b59c5479bb44e08ef9f443.tar.bz2 |
Add support for high contrast mode to bubbles
BUG=105023
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113634
Review URL: http://codereview.chromium.org/8887003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113661 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/views/avatar_menu_bubble_view.cc | 6 | ||||
-rw-r--r-- | ui/views/bubble/bubble_delegate.cc | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc index 2dae9fc..9f1b081 100644 --- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc +++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc @@ -288,6 +288,11 @@ void ProfileItemView::OnBlur() { void ProfileItemView::OnHighlightStateChanged() { set_background(IsHighlighted() ? views::Background::CreateSolidBackground( SkColorSetRGB(0xe3, 0xed, 0xf6)) : NULL); + SkColor background_color = background() ? + background()->get_color() : views::BubbleDelegateView::kBackgroundColor; + name_label_->SetBackgroundColor(background_color); + sync_state_label_->SetBackgroundColor(background_color); + edit_link_->SetBackgroundColor(background_color); bool show_edit = IsHighlighted() && item_.active; sync_state_label_->SetVisible(!show_edit); @@ -488,6 +493,7 @@ void AvatarMenuBubbleView::OnAvatarMenuModelChanged( l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)); add_profile_link_->set_listener(this); add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); + add_profile_link_->SetBackgroundColor(color()); add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); AddChildView(add_profile_link_); diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc index 2592270..9a790d9 100644 --- a/ui/views/bubble/bubble_delegate.cc +++ b/ui/views/bubble/bubble_delegate.cc @@ -5,6 +5,7 @@ #include "ui/views/bubble/bubble_delegate.h" #include "ui/base/animation/slide_animation.h" +#include "ui/gfx/color_utils.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/widget/widget.h" @@ -71,8 +72,13 @@ Widget* CreateBorderWidget(BubbleDelegateView* bubble, Widget* parent) { } // namespace -// TODO(msw): Use NativeTheme/color_helper (crbug.com/105023). +#if defined(OS_WIN) && !defined(USE_AURA) +const SkColor BubbleDelegateView::kBackgroundColor = + color_utils::GetSysSkColor(COLOR_WINDOW); +#else +// TODO(beng): source from theme provider. const SkColor BubbleDelegateView::kBackgroundColor = SK_ColorWHITE; +#endif BubbleDelegateView::BubbleDelegateView() : close_on_esc_(true), |