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

Unified Diff: ui/native_theme/native_theme_aura.cc

Issue 2572713005: Aura overlay scrollbar stroke should be only 3 sided.
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..6793a19820468cd38aa9ab88355cf6fff79239e9 100644
--- a/ui/native_theme/native_theme_aura.cc
+++ b/ui/native_theme/native_theme_aura.cc
@@ -233,7 +233,12 @@ void NativeThemeAura::PaintScrollbarThumb(
canvas->drawRect(gfx::RectFToSkRect(stroke_rect), paint);
// Inset the all the edges edges so we fill-in the stroke below.
- thumb_rect.Inset(kStrokeWidth, kStrokeWidth);
+ // TODO(bokan): Need to flip this for text direction of scroller.
+ if (part == NativeTheme::kScrollbarVerticalThumb)
+ thumb_rect.Inset(kStrokeWidth, kStrokeWidth, 0, kStrokeWidth);
+ else
+ thumb_rect.Inset(kStrokeWidth, kStrokeWidth, kStrokeWidth, 0);
+
} else {
// If there are no scrollbuttons then provide some padding so that the thumb
// doesn't touch the top of the track.
« 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