diff options
author | estade <estade@chromium.org> | 2015-09-02 17:34:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-03 00:34:56 +0000 |
commit | 3ef33286c4da3f97a174beda35ffd2a09649d60c (patch) | |
tree | 8a2d5f60c5a9904e4a77029150a15ba7492b9bbd /components/infobars | |
parent | 731e67d43f1f430be62b42ddff783ea1651dc81b (diff) | |
download | chromium_src-3ef33286c4da3f97a174beda35ffd2a09649d60c.zip chromium_src-3ef33286c4da3f97a174beda35ffd2a09649d60c.tar.gz chromium_src-3ef33286c4da3f97a174beda35ffd2a09649d60c.tar.bz2 |
Infobar material design refresh: bg color
BUG=520266
Review URL: https://codereview.chromium.org/1330513002
Cr-Commit-Position: refs/heads/master@{#347067}
Diffstat (limited to 'components/infobars')
-rw-r--r-- | components/infobars/core/infobar.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/infobars/core/infobar.cc b/components/infobars/core/infobar.cc index 29c1995..cd8aac4 100644 --- a/components/infobars/core/infobar.cc +++ b/components/infobars/core/infobar.cc @@ -10,6 +10,7 @@ #include "build/build_config.h" #include "components/infobars/core/infobar_container.h" #include "components/infobars/core/infobar_manager.h" +#include "ui/base/resource/material_design/material_design_controller.h" #include "ui/gfx/animation/slide_animation.h" namespace infobars { @@ -35,6 +36,15 @@ InfoBar::~InfoBar() { // static SkColor InfoBar::GetTopColor(InfoBarDelegate::Type infobar_type) { + if (ui::MaterialDesignController::IsModeMaterial()) { + static const SkColor kWarningBackgroundColorMd = + SkColorSetRGB(0xFF, 0xEC, 0xB3); // Yellow + static const SkColor kPageActionBackgroundColorMd = SK_ColorWHITE; + + return infobar_type == InfoBarDelegate::WARNING_TYPE ? + kWarningBackgroundColorMd : kPageActionBackgroundColorMd; + } + static const SkColor kWarningBackgroundColorTop = SkColorSetRGB(255, 242, 183); // Yellow static const SkColor kPageActionBackgroundColorTop = @@ -45,6 +55,10 @@ SkColor InfoBar::GetTopColor(InfoBarDelegate::Type infobar_type) { // static SkColor InfoBar::GetBottomColor(InfoBarDelegate::Type infobar_type) { + // No gradient in MD. + if (ui::MaterialDesignController::IsModeMaterial()) + return GetTopColor(infobar_type); + static const SkColor kWarningBackgroundColorBottom = SkColorSetRGB(250, 230, 145); // Yellow static const SkColor kPageActionBackgroundColorBottom = |