OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |