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 "ui/views/controls/progress_bar.h" | 5 #include "ui/views/controls/progress_bar.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" | 13 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" |
14 #include "third_party/skia/include/effects/SkGradientShader.h" | 14 #include "third_party/skia/include/effects/SkGradientShader.h" |
15 #include "ui/base/accessibility/accessible_view_state.h" | 15 #include "ui/base/accessibility/accessible_view_state.h" |
16 #include "ui/gfx/canvas_skia.h" | 16 #include "ui/gfx/canvas.h" |
17 #include "ui/gfx/color_utils.h" | 17 #include "ui/gfx/color_utils.h" |
18 #include "ui/gfx/font.h" | 18 #include "ui/gfx/font.h" |
19 #include "ui/gfx/insets.h" | 19 #include "ui/gfx/insets.h" |
20 #include "ui/views/background.h" | 20 #include "ui/views/background.h" |
21 #include "ui/views/border.h" | 21 #include "ui/views/border.h" |
22 #include "ui/views/painter.h" | 22 #include "ui/views/painter.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Corner radius for the progress bar's border. | 26 // Corner radius for the progress bar's border. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 if (progress_width > 1) { | 295 if (progress_width > 1) { |
296 FillRoundRect(canvas, 0, 0, progress_width, height(), kCornerRadius, | 296 FillRoundRect(canvas, 0, 0, progress_width, height(), kCornerRadius, |
297 kBarColorStart, kBarColorEnd, false); | 297 kBarColorStart, kBarColorEnd, false); |
298 } | 298 } |
299 StrokeRoundRect(canvas, 0, 0, width(), height(), kCornerRadius, | 299 StrokeRoundRect(canvas, 0, 0, width(), height(), kCornerRadius, |
300 kBorderColor, kBorderWidth); | 300 kBorderColor, kBorderWidth); |
301 #endif | 301 #endif |
302 } | 302 } |
303 | 303 |
304 } // namespace views | 304 } // namespace views |
OLD | NEW |