| 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/native_theme/native_theme_aura.h" | 5 #include "ui/native_theme/native_theme_aura.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "ui/native_theme/native_theme_switches.h" | 26 #include "ui/native_theme/native_theme_switches.h" |
| 27 #include "ui/native_theme/overlay_scrollbar_constants_aura.h" | 27 #include "ui/native_theme/overlay_scrollbar_constants_aura.h" |
| 28 | 28 |
| 29 namespace ui { | 29 namespace ui { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // Constants for painting overlay scrollbars. Other properties needed outside | 33 // Constants for painting overlay scrollbars. Other properties needed outside |
| 34 // this painting code are defined in overlay_scrollbar_constants_aura.h. | 34 // this painting code are defined in overlay_scrollbar_constants_aura.h. |
| 35 constexpr int kOverlayScrollbarStrokeWidth = 1; | 35 constexpr int kOverlayScrollbarStrokeWidth = 1; |
| 36 constexpr int kOverlayScrollbarMinimumLength = 32; | 36 constexpr int kOverlayScrollbarMinimumLength = 12; |
| 37 | 37 |
| 38 // 2 pixel border with 1 pixel center patch. The border is 2 pixels despite the | 38 // 2 pixel border with 1 pixel center patch. The border is 2 pixels despite the |
| 39 // stroke width being 1 so that the inner pixel can match the center tile | 39 // stroke width being 1 so that the inner pixel can match the center tile |
| 40 // color. This prevents color interpolation between the patches. | 40 // color. This prevents color interpolation between the patches. |
| 41 constexpr int kOverlayScrollbarBorderPatchWidth = 2; | 41 constexpr int kOverlayScrollbarBorderPatchWidth = 2; |
| 42 constexpr int kOverlayScrollbarCenterPatchSize = 1; | 42 constexpr int kOverlayScrollbarCenterPatchSize = 1; |
| 43 | 43 |
| 44 const SkColor kTrackColor = SkColorSetRGB(0xF1, 0xF1, 0xF1); | 44 const SkColor kTrackColor = SkColorSetRGB(0xF1, 0xF1, 0xF1); |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 gfx::Rect NativeThemeAura::GetNinePatchAperture(Part part) const { | 341 gfx::Rect NativeThemeAura::GetNinePatchAperture(Part part) const { |
| 342 DCHECK(SupportsNinePatch(part)); | 342 DCHECK(SupportsNinePatch(part)); |
| 343 | 343 |
| 344 return gfx::Rect( | 344 return gfx::Rect( |
| 345 kOverlayScrollbarBorderPatchWidth, kOverlayScrollbarBorderPatchWidth, | 345 kOverlayScrollbarBorderPatchWidth, kOverlayScrollbarBorderPatchWidth, |
| 346 kOverlayScrollbarCenterPatchSize, kOverlayScrollbarCenterPatchSize); | 346 kOverlayScrollbarCenterPatchSize, kOverlayScrollbarCenterPatchSize); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace ui | 349 } // namespace ui |
| OLD | NEW |