| 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 10 matching lines...) Expand all Loading... |
| 21 #include "skia/ext/platform_canvas.h" | 21 #include "skia/ext/platform_canvas.h" |
| 22 #include "skia/ext/skia_utils_win.h" | 22 #include "skia/ext/skia_utils_win.h" |
| 23 #include "third_party/skia/include/core/SkCanvas.h" | 23 #include "third_party/skia/include/core/SkCanvas.h" |
| 24 #include "third_party/skia/include/core/SkColorPriv.h" | 24 #include "third_party/skia/include/core/SkColorPriv.h" |
| 25 #include "third_party/skia/include/core/SkShader.h" | 25 #include "third_party/skia/include/core/SkShader.h" |
| 26 #include "ui/base/win/dpi.h" | 26 #include "ui/base/win/dpi.h" |
| 27 #include "ui/gfx/color_utils.h" | 27 #include "ui/gfx/color_utils.h" |
| 28 #include "ui/gfx/gdi_util.h" | 28 #include "ui/gfx/gdi_util.h" |
| 29 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/rect.h" |
| 30 #include "ui/gfx/rect_conversions.h" | 30 #include "ui/gfx/rect_conversions.h" |
| 31 #include "ui/gfx/sys_color_change_listener.h" |
| 31 #include "ui/native_theme/common_theme.h" | 32 #include "ui/native_theme/common_theme.h" |
| 32 | 33 |
| 33 // This was removed from Winvers.h but is still used. | 34 // This was removed from Winvers.h but is still used. |
| 34 #if !defined(COLOR_MENUHIGHLIGHT) | 35 #if !defined(COLOR_MENUHIGHLIGHT) |
| 35 #define COLOR_MENUHIGHLIGHT 29 | 36 #define COLOR_MENUHIGHLIGHT 29 |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 namespace { | 39 namespace { |
| 39 | 40 |
| 40 // TODO: Obtain the correct colors using GetSysColor. | 41 // TODO: Obtain the correct colors using GetSysColor. |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 if (CommonThemeGetSystemColor(color_id, &color)) | 493 if (CommonThemeGetSystemColor(color_id, &color)) |
| 493 return color; | 494 return color; |
| 494 | 495 |
| 495 switch (color_id) { | 496 switch (color_id) { |
| 496 // Windows | 497 // Windows |
| 497 case kColorId_WindowBackground: | 498 case kColorId_WindowBackground: |
| 498 return system_colors_[COLOR_WINDOW]; | 499 return system_colors_[COLOR_WINDOW]; |
| 499 | 500 |
| 500 // Dialogs | 501 // Dialogs |
| 501 case kColorId_DialogBackground: | 502 case kColorId_DialogBackground: |
| 503 if (gfx::IsInvertedColorScheme()) |
| 504 return color_utils::InvertColor(kDialogBackgroundColor); |
| 502 return kDialogBackgroundColor; | 505 return kDialogBackgroundColor; |
| 503 | 506 |
| 504 // FocusableBorder | 507 // FocusableBorder |
| 505 case kColorId_FocusedBorderColor: | 508 case kColorId_FocusedBorderColor: |
| 506 return kFocusedBorderColor; | 509 return kFocusedBorderColor; |
| 507 case kColorId_UnfocusedBorderColor: | 510 case kColorId_UnfocusedBorderColor: |
| 508 return kUnfocusedBorderColor; | 511 return kUnfocusedBorderColor; |
| 509 | 512 |
| 510 // Button | 513 // Button |
| 511 case kColorId_ButtonBackgroundColor: | 514 case kColorId_ButtonBackgroundColor: |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 handle = open_theme_(NULL, L"Spin"); | 2093 handle = open_theme_(NULL, L"Spin"); |
| 2091 break; | 2094 break; |
| 2092 default: | 2095 default: |
| 2093 NOTREACHED(); | 2096 NOTREACHED(); |
| 2094 } | 2097 } |
| 2095 theme_handles_[theme_name] = handle; | 2098 theme_handles_[theme_name] = handle; |
| 2096 return handle; | 2099 return handle; |
| 2097 } | 2100 } |
| 2098 | 2101 |
| 2099 } // namespace ui | 2102 } // namespace ui |
| OLD | NEW |