Skip to content

Commit

Permalink
[MD User Menu] Adjusted its background color
Browse files Browse the repository at this point in the history
See first bug.
BUG=636073
BUG=615893

Review-Url: https://codereview.chromium.org/2241293003
Cr-Commit-Position: refs/heads/master@{#414092}
  • Loading branch information
janeliulwq authored and Commit bot committed Aug 24, 2016
1 parent b95ffca commit 1235009
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/native_theme/native_theme_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "third_party/skia/include/core/SkDrawLooper.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/shadow_value.h"
Expand Down Expand Up @@ -131,7 +132,9 @@ SkColor ColorToGrayscale(SkColor color) {
case kColorId_WindowBackground:
return NSSystemColorToSkColor([NSColor windowBackgroundColor]);
case kColorId_DialogBackground:
return kDialogBackgroundColor;
return ui::MaterialDesignController::IsSecondaryUiMaterial()
? GetAuraColor(color_id, this)
: kDialogBackgroundColor;
case kColorId_BubbleBackground:
return SK_ColorWHITE;

Expand Down
2 changes: 2 additions & 0 deletions ui/native_theme/native_theme_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
// Dialogs
case kColorId_DialogBackground:
case kColorId_BubbleBackground:
if (ui::MaterialDesignController::IsSecondaryUiMaterial())
break;
return color_utils::IsInvertedColorScheme() ?
color_utils::InvertColor(kDialogBackgroundColor) :
kDialogBackgroundColor;
Expand Down

0 comments on commit 1235009

Please sign in to comment.