Chromium Code Reviews| Index: ui/native_theme/native_theme_aura.cc |
| diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc |
| index 76283878e06a13f8cb77b8adbc90799dfea2aa28..0a79e6aa205d59ff7db12f95b2c1d367072d7dfa 100644 |
| --- a/ui/native_theme/native_theme_aura.cc |
| +++ b/ui/native_theme/native_theme_aura.cc |
| @@ -17,6 +17,7 @@ |
| #include "ui/gfx/animation/tween.h" |
| #include "ui/gfx/canvas.h" |
| #include "ui/gfx/color_palette.h" |
| +#include "ui/gfx/geometry/insets.h" |
| #include "ui/gfx/geometry/rect.h" |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/image/image_skia.h" |
| @@ -251,7 +252,16 @@ void NativeThemeAura::PaintScrollbarThumb( |
| canvas->drawRect(gfx::RectFToSkRect(stroke_rect), flags); |
| // Inset the all the edges edges so we fill-in the stroke below. |
| - thumb_rect.Inset(kStrokeWidth, kStrokeWidth); |
| + // The edge to which the scrollbar is attached shouldn't have a border. |
| + // For left vertical scrollbar, we will filp the canvas in |
|
bokan
2017/03/29 18:41:48
Nit: same typo here.
|
| + // ScrollbarThemeOverlay::paintThumb. |
| + gfx::Insets insets(kStrokeWidth); |
| + if (part == NativeTheme::kScrollbarHorizontalThumb) |
| + insets -= gfx::Insets(0, 0, kStrokeWidth, 0); |
| + else |
| + insets -= gfx::Insets(0, 0, 0, kStrokeWidth); |
| + |
| + thumb_rect.Inset(insets); |
| } else { |
| switch (state) { |
| case NativeTheme::kDisabled: |