Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: ui/native_theme/native_theme_aura.cc

Issue 2734483002: Reland Change minimum length of Aura overlay scrollbars. (Closed)
Patch Set: Fix breakage on Android Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 = 12; 36 constexpr int kOverlayScrollbarMinimumLength = 32;
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698