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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 12330018: Fix the size of scrollbars when using the Windows Classic theme. (Closed) Base URL: http://git.chromium.org/chromium/src.git@views-toolbar
Patch Set: Created 7 years, 10 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 b3d09a49d9ba0871a70f96cde7a591bee43cc2a6..564d4016683f8c76f32b4e89afaac74f3d740211 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -73,6 +73,10 @@ const int kSystemColors[] = {
COLOR_MENUHIGHLIGHT,
};
+const int kUnthemedScrollbarThickness =
+ static_cast<int>(GetSystemMetrics(SM_CXVSCROLL) /
sky 2013/02/20 22:22:47 Can't GetSystemMetrics change?
kevers 2013/02/20 22:37:22 The system metric could change if you update your
sky 2013/02/20 22:59:00 When that happens don't we get a WM_SYSCOLORCHANGE
+ ui::win::GetDeviceScaleFactor());
+
void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) {
// Create a 2x2 checkerboard pattern using the 3D face and highlight colors.
const SkColor face = color_utils::GetSysSkColor(COLOR_3DFACE);
@@ -254,6 +258,14 @@ gfx::Size NativeThemeWin::GetPartSize(Part part,
size.cx = 13;
size.cy = 13;
break;
+ case kScrollbarDownArrow:
+ case kScrollbarLeftArrow:
+ case kScrollbarRightArrow:
+ case kScrollbarUpArrow:
+ case kScrollbarHorizontalThumb:
+ case kScrollbarVerticalThumb:
+ size.cx = size.cy = kUnthemedScrollbarThickness;
+ break;
default:
size.cx = 0;
size.cy = 0;
« 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