Index: ui/gfx/native_theme_win.cc |
diff --git a/ui/gfx/native_theme_win.cc b/ui/gfx/native_theme_win.cc |
index 9114e354b1a8d7b3e6933938da3abb8b675b44fd..5d38044192497328804ec97297d7b62ea5b7f1bb 100644 |
--- a/ui/gfx/native_theme_win.cc |
+++ b/ui/gfx/native_theme_win.cc |
@@ -27,6 +27,12 @@ |
namespace { |
+const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); |
+ |
+SkColor WinColorToSkColor(COLORREF color) { |
+ return SkColorSetRGB(GetRValue(color), GetGValue(color), GetBValue(color)); |
+} |
+ |
void SetCheckerboardShader(SkPaint* paint, const RECT& align_rect) { |
// Create a 2x2 checkerboard pattern using the 3D face and highlight colors. |
SkColor face = skia::COLORREFToSkColor(GetSysColor(COLOR_3DFACE)); |
@@ -1682,4 +1688,17 @@ int NativeThemeWin::GetWindowsState(Part part, |
return state_id; |
} |
+SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const { |
Ben Goodger (Google)
2011/11/21 18:59:59
and update .cc to match .h file location
benrg
2011/11/21 19:54:20
Done, but this puts GetSystemColor in the middle o
|
+ switch (color_id) { |
+ case kDialogBackgroundColorId: |
+ // TODO(benrg): Should this use the new Windows theme functions? The old |
+ // code in DialogClientView::OnPaint used GetSysColor(COLOR_3DFACE). |
+ return WinColorToSkColor(GetSysColor(COLOR_3DFACE)); |
+ default: |
+ NOTREACHED() << "Invalid color_id: " << color_id; |
+ break; |
+ } |
+ return kInvalidColorIdColor; |
+} |
+ |
} // namespace gfx |