Commit 46e291af authored by benwells's avatar benwells Committed by Commit bot

Remove transparency from inactive ash app windows.

BUG=458232

Review URL: https://codereview.chromium.org/934673002

Cr-Commit-Position: refs/heads/master@{#316635}
parent 3edb8729
...@@ -37,8 +37,6 @@ const SkColor kHeaderContentSeparatorInactiveColor = ...@@ -37,8 +37,6 @@ const SkColor kHeaderContentSeparatorInactiveColor =
SkColorSetRGB(180, 180, 182); SkColorSetRGB(180, 180, 182);
// The default color of the frame. // The default color of the frame.
const SkColor kDefaultFrameColor = SkColorSetRGB(242, 242, 242); const SkColor kDefaultFrameColor = SkColorSetRGB(242, 242, 242);
// The alpha of the inactive frame.
const SkAlpha kInactiveFrameAlpha = 204;
// Duration of crossfade animation for activating and deactivating frame. // Duration of crossfade animation for activating and deactivating frame.
const int kActivationCrossfadeDurationMs = 200; const int kActivationCrossfadeDurationMs = 200;
...@@ -165,8 +163,8 @@ void DefaultHeaderPainter::PaintHeader(gfx::Canvas* canvas, Mode mode) { ...@@ -165,8 +163,8 @@ void DefaultHeaderPainter::PaintHeader(gfx::Canvas* canvas, Mode mode) {
SkPaint paint; SkPaint paint;
int active_alpha = activation_animation_->CurrentValueBetween(0, 255); int active_alpha = activation_animation_->CurrentValueBetween(0, 255);
paint.setColor(color_utils::AlphaBlend( paint.setColor(color_utils::AlphaBlend(active_frame_color_,
active_frame_color_, GetInactiveFrameColor(), active_alpha)); inactive_frame_color_, active_alpha));
TileRoundRect(canvas, paint, GetLocalBounds(), corner_radius); TileRoundRect(canvas, paint, GetLocalBounds(), corner_radius);
...@@ -345,15 +343,4 @@ bool DefaultHeaderPainter::UsesCustomFrameColors() const { ...@@ -345,15 +343,4 @@ bool DefaultHeaderPainter::UsesCustomFrameColors() const {
inactive_frame_color_ != kDefaultFrameColor; inactive_frame_color_ != kDefaultFrameColor;
} }
SkColor DefaultHeaderPainter::GetInactiveFrameColor() const {
SkColor color = inactive_frame_color_;
if (!frame_->IsMaximized() && !frame_->IsFullscreen()) {
color = SkColorSetARGB(kInactiveFrameAlpha,
SkColorGetR(color),
SkColorGetG(color),
SkColorGetB(color));
}
return color;
}
} // namespace ash } // namespace ash
...@@ -88,9 +88,6 @@ class ASH_EXPORT DefaultHeaderPainter : public HeaderPainter, ...@@ -88,9 +88,6 @@ class ASH_EXPORT DefaultHeaderPainter : public HeaderPainter,
// Returns whether the frame uses custom frame coloring. // Returns whether the frame uses custom frame coloring.
bool UsesCustomFrameColors() const; bool UsesCustomFrameColors() const;
// Returns the frame color to use when |frame_| is inactive.
SkColor GetInactiveFrameColor() const;
views::Widget* frame_; views::Widget* frame_;
views::View* view_; views::View* view_;
views::View* left_header_view_; // May be NULL. views::View* left_header_view_; // May be NULL.
......
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