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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 143953007: Changes look for scrollbars on windows (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 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.cc ('k') | ui/resources/ui_resources.grd » ('j') | 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 74b4f14a26163b5e27c5c8b1828c7f4500a674d6..bf21dcbd17808e7fb23f1280e119a3139e8c86e4 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -233,7 +233,6 @@ gfx::Size NativeThemeWin::GetPartSize(Part part,
// The GetThemePartSize call below returns the default size without
// accounting for user customization (crbug/218291).
- SIZE size;
switch (part) {
case kScrollbarDownArrow:
case kScrollbarLeftArrow:
@@ -242,14 +241,18 @@ gfx::Size NativeThemeWin::GetPartSize(Part part,
case kScrollbarHorizontalThumb:
case kScrollbarVerticalThumb:
case kScrollbarHorizontalTrack:
- case kScrollbarVerticalTrack:
- size.cx = size.cy = gfx::win::GetSystemMetricsInDIP(SM_CXVSCROLL);
- return gfx::Size(size.cx, size.cy);
+ case kScrollbarVerticalTrack: {
+ int size = gfx::win::GetSystemMetricsInDIP(SM_CXVSCROLL);
+ if (size == 0)
+ size = 17;
+ return gfx::Size(size, size);
+ }
}
int part_id = GetWindowsPart(part, state, extra);
int state_id = GetWindowsState(part, state, extra);
+ SIZE size;
HDC hdc = GetDC(NULL);
HRESULT hr = GetThemePartSize(GetThemeName(part), hdc, part_id, state_id,
NULL, TS_TRUE, &size);
« no previous file with comments | « ui/native_theme/native_theme_base.cc ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698