Commit 22d90237 authored by sail@chromium.org's avatar sail@chromium.org

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
parent 2040e30f
......@@ -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_);
......
......@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment