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

Unified Diff: ui/native_theme/native_theme_aura.cc

Issue 2583503002: Alpha for overlay scrollbars decreased when hovered. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4b6742f795fc1ee9fec0e0ce63f11da37d94c27e..b3e90e5f8c203af8ed31d3901402bfbff1ee1579 100644
--- a/ui/native_theme/native_theme_aura.cc
+++ b/ui/native_theme/native_theme_aura.cc
@@ -35,6 +35,7 @@ constexpr int kOverlayScrollbarMinimumLength = 12;
constexpr SkAlpha kOverlayScrollbarAlphaNormal = 0x4D;
constexpr SkAlpha kOverlayScrollbarAlphaHovered = 0x80;
constexpr SkAlpha kOverlayScrollbarAlphaPressed = 0x80;
+constexpr SkAlpha kOverlayStrokeAlphaHovered = 0x58;
// Indexed by ScrollbarOverlayColorTheme.
constexpr SkColor kOverlayScrollbarThumbColor[] = {SK_ColorBLACK,
@@ -222,8 +223,12 @@ void NativeThemeAura::PaintScrollbarThumb(
// In overlay mode, draw a stroke (border).
constexpr int kStrokeWidth = kOverlayScrollbarStrokeWidth;
SkPaint paint;
+
+ SkAlpha stroke_alpha = state == NativeTheme::kHovered
+ ? kOverlayStrokeAlphaHovered
+ : thumb_alpha;
bokan 2016/12/15 17:59:28 for consistency, replace thumb_alpha here with a n
paint.setColor(
- SkColorSetA(kOverlayScrollbarStrokeColor[theme], thumb_alpha));
+ SkColorSetA(kOverlayScrollbarStrokeColor[theme], stroke_alpha));
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(kStrokeWidth);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698