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

Side by Side Diff: ui/native_theme/native_theme_win.cc

Issue 12302043: Revert 182726 - Speculative. Will reland if no perf change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/native_theme/native_theme_win.h" 5 #include "ui/native_theme/native_theme_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <uxtheme.h> 8 #include <uxtheme.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // when theming is not enabled. Support for other parts can be added 247 // when theming is not enabled. Support for other parts can be added
248 // if/when needed. 248 // if/when needed.
249 switch (part) { 249 switch (part) {
250 case kCheckbox: 250 case kCheckbox:
251 case kRadio: 251 case kRadio:
252 // TODO(rogerta): I was not able to find any API to get the default 252 // TODO(rogerta): I was not able to find any API to get the default
253 // size of these controls, so determined these values empirically. 253 // size of these controls, so determined these values empirically.
254 size.cx = 13; 254 size.cx = 13;
255 size.cy = 13; 255 size.cy = 13;
256 break; 256 break;
257 case kScrollbarDownArrow:
258 case kScrollbarLeftArrow:
259 case kScrollbarRightArrow:
260 case kScrollbarUpArrow:
261 case kScrollbarHorizontalThumb:
262 case kScrollbarVerticalThumb:
263 size.cx = size.cy = static_cast<int>(GetSystemMetrics(SM_CXVSCROLL) /
264 ui::win::GetDeviceScaleFactor());
265 break;
266 default: 257 default:
267 size.cx = 0; 258 size.cx = 0;
268 size.cy = 0; 259 size.cy = 0;
269 break; 260 break;
270 } 261 }
271 } 262 }
272 263
273 return gfx::Size(size.cx, size.cy); 264 return gfx::Size(size.cx, size.cy);
274 } 265 }
275 266
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 handle = open_theme_(NULL, L"Spin"); 2057 handle = open_theme_(NULL, L"Spin");
2067 break; 2058 break;
2068 default: 2059 default:
2069 NOTREACHED(); 2060 NOTREACHED();
2070 } 2061 }
2071 theme_handles_[theme_name] = handle; 2062 theme_handles_[theme_name] = handle;
2072 return handle; 2063 return handle;
2073 } 2064 }
2074 2065
2075 } // namespace ui 2066 } // namespace ui
OLDNEW
« 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