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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 13649002: Fix missing scrollbar thumb on WinXP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « 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_win.cc
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index dc2e2c5f596a880d723c7ca3268b24d03deb289f..62ab0ce32f4a1d0a516ad81083468055707f0d83 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -310,18 +310,25 @@ void NativeThemeWin::Paint(SkCanvas* canvas,
// This block will only get hit with --enable-accelerated-drawing flag.
needs_paint_indirect = true;
} else {
- // Scrollbars on Windows XP and the Windows Classic theme have particularly
- // problematic alpha values, so always draw them indirectly.
+ // Scrollbar components on Windows Classic theme (on all Windows versions)
+ // have particularly problematic alpha values, so always draw them
+ // indirectly. In addition, scrollbar thumbs and grippers for the Windows XP
+ // theme (available only on Windows XP) also need their alpha values
+ // fixed.
switch (part) {
case kScrollbarDownArrow:
case kScrollbarUpArrow:
case kScrollbarLeftArrow:
case kScrollbarRightArrow:
+ if (!GetThemeHandle(SCROLLBAR))
+ needs_paint_indirect = true;
+ break;
case kScrollbarHorizontalThumb:
case kScrollbarVerticalThumb:
case kScrollbarHorizontalGripper:
case kScrollbarVerticalGripper:
- if (!GetThemeHandle(SCROLLBAR))
+ if (!GetThemeHandle(SCROLLBAR) ||
+ base::win::GetVersion() == base::win::VERSION_XP)
needs_paint_indirect = true;
break;
default:
« 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