OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/common/system/tray/tray_details_view.h" | 5 #include "ash/common/system/tray/tray_details_view.h" |
6 | 6 |
7 #include "ash/common/ash_view_ids.h" | 7 #include "ash/common/ash_view_ids.h" |
8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
9 #include "ash/common/system/tray/system_menu_button.h" | 9 #include "ash/common/system/tray/system_menu_button.h" |
10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 // Draws a drop shadow below |shadowed_area|. | 211 // Draws a drop shadow below |shadowed_area|. |
212 void DrawShadow(const ui::PaintContext& context, | 212 void DrawShadow(const ui::PaintContext& context, |
213 const gfx::Rect& shadowed_area) { | 213 const gfx::Rect& shadowed_area) { |
214 ui::PaintRecorder recorder(context, size()); | 214 ui::PaintRecorder recorder(context, size()); |
215 gfx::Canvas* canvas = recorder.canvas(); | 215 gfx::Canvas* canvas = recorder.canvas(); |
216 cc::PaintFlags flags; | 216 cc::PaintFlags flags; |
217 gfx::ShadowValues shadow; | 217 gfx::ShadowValues shadow; |
218 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, | 218 shadow.emplace_back(gfx::Vector2d(0, kShadowOffsetY), kShadowBlur, |
219 kMenuSeparatorColor); | 219 kMenuSeparatorColor); |
220 flags.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadow)); | 220 flags.setLooper(gfx::CreateShadowDrawLooper(shadow)); |
221 flags.setAntiAlias(true); | 221 flags.setAntiAlias(true); |
222 canvas->ClipRect(shadowed_area, SkClipOp::kDifference); | 222 canvas->ClipRect(shadowed_area, SkClipOp::kDifference); |
223 canvas->DrawRect(shadowed_area, flags); | 223 canvas->DrawRect(shadowed_area, flags); |
224 } | 224 } |
225 | 225 |
226 views::BoxLayout* box_layout_; | 226 views::BoxLayout* box_layout_; |
227 | 227 |
228 // Header child views that stick to the top of visible viewport when scrolled. | 228 // Header child views that stick to the top of visible viewport when scrolled. |
229 std::vector<Header> headers_; | 229 std::vector<Header> headers_; |
230 | 230 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 if (index < child_count() - 1 && child_at(index + 1) != title_row_) | 501 if (index < child_count() - 1 && child_at(index + 1) != title_row_) |
502 scroll_border_->set_visible(true); | 502 scroll_border_->set_visible(true); |
503 else | 503 else |
504 scroll_border_->set_visible(false); | 504 scroll_border_->set_visible(false); |
505 } | 505 } |
506 | 506 |
507 views::View::OnPaintBorder(canvas); | 507 views::View::OnPaintBorder(canvas); |
508 } | 508 } |
509 | 509 |
510 } // namespace ash | 510 } // namespace ash |
OLD | NEW |