| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/frame/windows_10_caption_button.h" | 5 #include "chrome/browser/ui/views/frame/windows_10_caption_button.h" |
| 6 | 6 |
| 7 #include "chrome/browser/themes/theme_properties.h" | 7 #include "chrome/browser/themes/theme_properties.h" |
| 8 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 9 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" | 9 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" |
| 10 #include "chrome/grit/theme_resources.h" | 10 #include "chrome/grit/theme_resources.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 DrawRect(canvas, symbol_rect, paint); | 169 DrawRect(canvas, symbol_rect, paint); |
| 170 return; | 170 return; |
| 171 | 171 |
| 172 case VIEW_ID_RESTORE_BUTTON: { | 172 case VIEW_ID_RESTORE_BUTTON: { |
| 173 // Bottom left ("in front") square. | 173 // Bottom left ("in front") square. |
| 174 const int separation = std::floor(2 * scale); | 174 const int separation = std::floor(2 * scale); |
| 175 symbol_rect.Inset(0, separation, separation, 0); | 175 symbol_rect.Inset(0, separation, separation, 0); |
| 176 DrawRect(canvas, symbol_rect, paint); | 176 DrawRect(canvas, symbol_rect, paint); |
| 177 | 177 |
| 178 // Top right ("behind") square. | 178 // Top right ("behind") square. |
| 179 canvas->ClipRect(symbol_rect, kDifference_SkClipOp); | 179 canvas->ClipRect(symbol_rect, SkClipOp::kDifference); |
| 180 symbol_rect.Offset(separation, -separation); | 180 symbol_rect.Offset(separation, -separation); |
| 181 DrawRect(canvas, symbol_rect, paint); | 181 DrawRect(canvas, symbol_rect, paint); |
| 182 return; | 182 return; |
| 183 } | 183 } |
| 184 | 184 |
| 185 case VIEW_ID_CLOSE_BUTTON: { | 185 case VIEW_ID_CLOSE_BUTTON: { |
| 186 paint.setAntiAlias(true); | 186 paint.setAntiAlias(true); |
| 187 // The close button's X is surrounded by a "halo" of transparent pixels. | 187 // The close button's X is surrounded by a "halo" of transparent pixels. |
| 188 // When the X is white, the transparent pixels need to be a bit brighter | 188 // When the X is white, the transparent pixels need to be a bit brighter |
| 189 // to be visible. | 189 // to be visible. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 201 path.lineTo(symbol_rect.x(), symbol_rect.bottom()); | 201 path.lineTo(symbol_rect.x(), symbol_rect.bottom()); |
| 202 canvas->DrawPath(path, paint); | 202 canvas->DrawPath(path, paint); |
| 203 return; | 203 return; |
| 204 } | 204 } |
| 205 | 205 |
| 206 default: | 206 default: |
| 207 NOTREACHED(); | 207 NOTREACHED(); |
| 208 return; | 208 return; |
| 209 } | 209 } |
| 210 } | 210 } |
| OLD | NEW |