OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/gfx/native_theme.h" | 5 #include "base/gfx/native_theme.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 DrawFrameControl(hdc, rect, DFC_SCROLL, classic_state); | 192 DrawFrameControl(hdc, rect, DFC_SCROLL, classic_state); |
193 return S_OK; | 193 return S_OK; |
194 } | 194 } |
195 | 195 |
196 HRESULT NativeTheme::PaintScrollbarTrack(HDC hdc, | 196 HRESULT NativeTheme::PaintScrollbarTrack(HDC hdc, |
197 int part_id, | 197 int part_id, |
198 int state_id, | 198 int state_id, |
199 int classic_state, | 199 int classic_state, |
200 RECT* target_rect, | 200 RECT* target_rect, |
201 RECT* align_rect, | 201 RECT* align_rect, |
202 PlatformCanvasWin* canvas) const { | 202 skia::PlatformCanvasWin* canvas) const
{ |
203 HANDLE handle = GetThemeHandle(SCROLLBAR); | 203 HANDLE handle = GetThemeHandle(SCROLLBAR); |
204 if (handle && draw_theme_) | 204 if (handle && draw_theme_) |
205 return draw_theme_(handle, hdc, part_id, state_id, target_rect, NULL); | 205 return draw_theme_(handle, hdc, part_id, state_id, target_rect, NULL); |
206 | 206 |
207 // Draw it manually. | 207 // Draw it manually. |
208 const DWORD colorScrollbar = GetSysColor(COLOR_SCROLLBAR); | 208 const DWORD colorScrollbar = GetSysColor(COLOR_SCROLLBAR); |
209 const DWORD color3DFace = GetSysColor(COLOR_3DFACE); | 209 const DWORD color3DFace = GetSysColor(COLOR_3DFACE); |
210 if ((colorScrollbar != color3DFace) && | 210 if ((colorScrollbar != color3DFace) && |
211 (colorScrollbar != GetSysColor(COLOR_WINDOW))) { | 211 (colorScrollbar != GetSysColor(COLOR_WINDOW))) { |
212 FillRect(hdc, target_rect, reinterpret_cast<HBRUSH>(COLOR_SCROLLBAR + 1)); | 212 FillRect(hdc, target_rect, reinterpret_cast<HBRUSH>(COLOR_SCROLLBAR + 1)); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 break; | 603 break; |
604 default: | 604 default: |
605 NOTREACHED(); | 605 NOTREACHED(); |
606 } | 606 } |
607 theme_handles_[theme_name] = handle; | 607 theme_handles_[theme_name] = handle; |
608 return handle; | 608 return handle; |
609 } | 609 } |
610 | 610 |
611 } // namespace gfx | 611 } // namespace gfx |
612 | 612 |
OLD | NEW |