diff options
author | benwells <benwells@chromium.org> | 2015-02-17 11:57:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-17 19:57:59 +0000 |
commit | 46e291af7e01c99395c1e52275ce901540ec527f (patch) | |
tree | 848f3089f57992f174f4302dafa1fc74ee869d7d /ash | |
parent | 3edb8729b72e1b1c77cda6d2431094079d2a8fad (diff) | |
download | chromium_src-46e291af7e01c99395c1e52275ce901540ec527f.zip chromium_src-46e291af7e01c99395c1e52275ce901540ec527f.tar.gz chromium_src-46e291af7e01c99395c1e52275ce901540ec527f.tar.bz2 |
Remove transparency from inactive ash app windows.
BUG=458232
Review URL: https://codereview.chromium.org/934673002
Cr-Commit-Position: refs/heads/master@{#316635}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/frame/default_header_painter.cc | 17 | ||||
-rw-r--r-- | ash/frame/default_header_painter.h | 3 |
2 files changed, 2 insertions, 18 deletions
diff --git a/ash/frame/default_header_painter.cc b/ash/frame/default_header_painter.cc index 530a6d7..236919f 100644 --- a/ash/frame/default_header_painter.cc +++ b/ash/frame/default_header_painter.cc @@ -37,8 +37,6 @@ const SkColor kHeaderContentSeparatorInactiveColor = SkColorSetRGB(180, 180, 182); // The default color of the frame. 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. const int kActivationCrossfadeDurationMs = 200; @@ -165,8 +163,8 @@ void DefaultHeaderPainter::PaintHeader(gfx::Canvas* canvas, Mode mode) { SkPaint paint; int active_alpha = activation_animation_->CurrentValueBetween(0, 255); - paint.setColor(color_utils::AlphaBlend( - active_frame_color_, GetInactiveFrameColor(), active_alpha)); + paint.setColor(color_utils::AlphaBlend(active_frame_color_, + inactive_frame_color_, active_alpha)); TileRoundRect(canvas, paint, GetLocalBounds(), corner_radius); @@ -345,15 +343,4 @@ bool DefaultHeaderPainter::UsesCustomFrameColors() const { 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 diff --git a/ash/frame/default_header_painter.h b/ash/frame/default_header_painter.h index 8be1891..1c5f979 100644 --- a/ash/frame/default_header_painter.h +++ b/ash/frame/default_header_painter.h @@ -88,9 +88,6 @@ class ASH_EXPORT DefaultHeaderPainter : public HeaderPainter, // Returns whether the frame uses custom frame coloring. bool UsesCustomFrameColors() const; - // Returns the frame color to use when |frame_| is inactive. - SkColor GetInactiveFrameColor() const; - views::Widget* frame_; views::View* view_; views::View* left_header_view_; // May be NULL. |