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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: fix test Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/native_theme/native_theme_base.h ('k') | 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_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index 331ceb46be0a5bfe58551fccd79bd72ee21cbf3f..b9d2827db8961cd0c240bcf7c01f23fde6359027 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -156,31 +156,6 @@ gfx::Size NativeThemeBase::GetPartSize(Part part,
return gfx::Size();
}
-void NativeThemeBase::PaintStateTransition(SkCanvas* canvas,
- Part part,
- State startState,
- State endState,
- double progress,
- const gfx::Rect& rect) const {
- if (rect.IsEmpty())
- return;
-
- // Currently state transition is animation only working for overlay scrollbars
- // on Aura platforms.
- switch (part) {
- case kScrollbarHorizontalThumb:
- case kScrollbarVerticalThumb:
- PaintScrollbarThumbStateTransition(canvas, part, startState, endState,
- progress, rect);
- break;
- default:
- NOTREACHED() << "Does not support state transition for this part:"
- << part;
- break;
- }
- return;
-}
-
void NativeThemeBase::Paint(SkCanvas* canvas,
Part part,
State state,
@@ -227,7 +202,8 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
break;
case kScrollbarHorizontalThumb:
case kScrollbarVerticalThumb:
- PaintScrollbarThumb(canvas, part, state, rect);
+ PaintScrollbarThumb(canvas, part, state, rect,
+ extra.scrollbar_thumb.scrollbar_theme);
break;
case kScrollbarHorizontalTrack:
case kScrollbarVerticalTrack:
@@ -434,9 +410,10 @@ void NativeThemeBase::PaintScrollbarTrack(SkCanvas* canvas,
}
void NativeThemeBase::PaintScrollbarThumb(SkCanvas* canvas,
- Part part,
- State state,
- const gfx::Rect& rect) const {
+ Part part,
+ State state,
+ const gfx::Rect& rect,
+ ScrollbarOverlayColorTheme) const {
const bool hovered = state == kHovered;
const int midx = rect.x() + rect.width() / 2;
const int midy = rect.y() + rect.height() / 2;
« no previous file with comments | « ui/native_theme/native_theme_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698