OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/pinch_zoom_scrollbar_painter.h" |
| 6 |
| 7 #include "third_party/skia/include/core/SkCanvas.h" |
| 8 #include "ui/gfx/rect.h" |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 PinchZoomScrollbarPainter::~PinchZoomScrollbarPainter() {} |
| 13 |
| 14 void PinchZoomScrollbarPainter::PaintScrollbarBackground( |
| 15 SkCanvas*, const gfx::Rect&) { |
| 16 } |
| 17 |
| 18 void PinchZoomScrollbarPainter::PaintTrackBackground( |
| 19 SkCanvas*, const gfx::Rect&) { |
| 20 } |
| 21 |
| 22 void PinchZoomScrollbarPainter::PaintBackTrackPart( |
| 23 SkCanvas*, const gfx::Rect&) { |
| 24 } |
| 25 |
| 26 void PinchZoomScrollbarPainter::PaintForwardTrackPart( |
| 27 SkCanvas*, const gfx::Rect&) { |
| 28 } |
| 29 |
| 30 void PinchZoomScrollbarPainter::PaintBackButtonStart( |
| 31 SkCanvas*, const gfx::Rect&) { |
| 32 } |
| 33 |
| 34 void PinchZoomScrollbarPainter::PaintBackButtonEnd( |
| 35 SkCanvas*, const gfx::Rect&) { |
| 36 } |
| 37 |
| 38 void PinchZoomScrollbarPainter::PaintForwardButtonStart( |
| 39 SkCanvas*, const gfx::Rect&) { |
| 40 } |
| 41 |
| 42 void PinchZoomScrollbarPainter::PaintForwardButtonEnd( |
| 43 SkCanvas*, const gfx::Rect&) { |
| 44 } |
| 45 |
| 46 void PinchZoomScrollbarPainter::PaintTickmarks( |
| 47 SkCanvas*, const gfx::Rect&) { |
| 48 } |
| 49 |
| 50 void PinchZoomScrollbarPainter::PaintThumb(SkCanvas* canvas, |
| 51 const gfx::Rect& thumb_rect) { |
| 52 canvas->clear(SkColorSetARGB(0, 0, 0, 0)); |
| 53 SkPaint paint; |
| 54 |
| 55 // TODO(wjmaclean): currently the pinch-zoom overlay scrollbars are |
| 56 // drawn as grey, but need to check this with UX design. |
| 57 paint.setColor(SkColorSetARGB(128, 32, 32, 32)); |
| 58 SkScalar border = 2; |
| 59 SkScalar corner_radius = 2; |
| 60 SkRect rect = SkRect::MakeXYWH(border, border, |
| 61 thumb_rect.width() - 2 * border, |
| 62 thumb_rect.height() - 2 * border); |
| 63 canvas->drawRoundRect(rect, corner_radius, corner_radius, paint); |
| 64 } |
| 65 |
| 66 } // namespace cc |
OLD | NEW |