| 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; |
| 257 default: | 266 default: |
| 258 size.cx = 0; | 267 size.cx = 0; |
| 259 size.cy = 0; | 268 size.cy = 0; |
| 260 break; | 269 break; |
| 261 } | 270 } |
| 262 } | 271 } |
| 263 | 272 |
| 264 return gfx::Size(size.cx, size.cy); | 273 return gfx::Size(size.cx, size.cy); |
| 265 } | 274 } |
| 266 | 275 |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 handle = open_theme_(NULL, L"Spin"); | 2066 handle = open_theme_(NULL, L"Spin"); |
| 2058 break; | 2067 break; |
| 2059 default: | 2068 default: |
| 2060 NOTREACHED(); | 2069 NOTREACHED(); |
| 2061 } | 2070 } |
| 2062 theme_handles_[theme_name] = handle; | 2071 theme_handles_[theme_name] = handle; |
| 2063 return handle; | 2072 return handle; |
| 2064 } | 2073 } |
| 2065 | 2074 |
| 2066 } // namespace ui | 2075 } // namespace ui |
| OLD | NEW |