Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: ash/frame/default_header_painter.cc

Issue 916293002: Remove ash default frame highlighting for custom colored frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ash/frame/default_header_painter.h ('K') | « ash/frame/default_header_painter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/default_header_painter.cc
diff --git a/ash/frame/default_header_painter.cc b/ash/frame/default_header_painter.cc
index 125cb510e2c161da0730ab929f8529cdaea95fad..530a6d703fc0ce08298b2562abf57b2af155dc80 100644
--- a/ash/frame/default_header_painter.cc
+++ b/ash/frame/default_header_painter.cc
@@ -170,16 +170,16 @@ void DefaultHeaderPainter::PaintHeader(gfx::Canvas* canvas, Mode mode) {
TileRoundRect(canvas, paint, GetLocalBounds(), corner_radius);
- if (!frame_->IsMaximized() &&
- !frame_->IsFullscreen() &&
- mode_ == MODE_INACTIVE) {
+ if (!frame_->IsMaximized() && !frame_->IsFullscreen() &&
+ mode_ == MODE_INACTIVE && !UsesCustomFrameColors()) {
PaintHighlightForInactiveRestoredWindow(canvas);
}
if (frame_->widget_delegate() &&
frame_->widget_delegate()->ShouldShowWindowTitle()) {
PaintTitleBar(canvas);
}
- PaintHeaderContentSeparator(canvas);
+ if (!UsesCustomFrameColors())
+ PaintHeaderContentSeparator(canvas);
}
void DefaultHeaderPainter::LayoutHeader() {
@@ -340,6 +340,11 @@ gfx::Rect DefaultHeaderPainter::GetTitleBounds() const {
left_header_view_, caption_button_container_, GetTitleFontList());
}
+bool DefaultHeaderPainter::UsesCustomFrameColors() const {
+ return active_frame_color_ != kDefaultFrameColor ||
+ inactive_frame_color_ != kDefaultFrameColor;
+}
+
SkColor DefaultHeaderPainter::GetInactiveFrameColor() const {
SkColor color = inactive_frame_color_;
if (!frame_->IsMaximized() && !frame_->IsFullscreen()) {
« ash/frame/default_header_painter.h ('K') | « ash/frame/default_header_painter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698