Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: ui/gfx/native_theme_win.cc

Issue 7008013: Fix scrollbar buttons in classic windows theme. When I refactored the code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/native_theme_win.h" 5 #include "ui/gfx/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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 break; 254 break;
255 default: 255 default:
256 NOTREACHED() << "Invalid part: " << part; 256 NOTREACHED() << "Invalid part: " << part;
257 break; 257 break;
258 } 258 }
259 } 259 }
260 260
261 return draw_theme_(handle, hdc, SBP_ARROWBTN, state_id, &rect_win, NULL); 261 return draw_theme_(handle, hdc, SBP_ARROWBTN, state_id, &rect_win, NULL);
262 } 262 }
263 263
264 // TODO: Draw it manually. 264 int classic_state = DFCS_SCROLLDOWN;
265 DrawFrameControl(hdc, &rect_win, DFC_SCROLL, 0); 265 switch(part) {
266 case kScrollbarDownArrow:
267 classic_state = DFCS_SCROLLDOWN;
268 break;
269 case kScrollbarLeftArrow:
270 classic_state = DFCS_SCROLLLEFT;
271 break;
272 case kScrollbarRightArrow:
273 classic_state = DFCS_SCROLLRIGHT;
274 break;
275 case kScrollbarUpArrow:
276 classic_state = DFCS_SCROLLUP;
277 break;
278 default:
279 NOTREACHED() << "Invalid part: " << part;
280 break;
281 }
282
283 DrawFrameControl(hdc, &rect_win, DFC_SCROLL, classic_state);
266 return S_OK; 284 return S_OK;
267 } 285 }
268 286
269 HRESULT NativeThemeWin::PaintScrollbarTrack( 287 HRESULT NativeThemeWin::PaintScrollbarTrack(
270 SkCanvas* canvas, 288 SkCanvas* canvas,
271 HDC hdc, 289 HDC hdc,
272 Part part, 290 Part part,
273 State state, 291 State state,
274 const gfx::Rect& rect, 292 const gfx::Rect& rect,
275 const ScrollbarTrackExtraParams& extra) const { 293 const ScrollbarTrackExtraParams& extra) const {
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 } 1525 }
1508 break; 1526 break;
1509 default: 1527 default:
1510 NOTREACHED() << "Invalid part: " << part; 1528 NOTREACHED() << "Invalid part: " << part;
1511 break; 1529 break;
1512 } 1530 }
1513 return state_id; 1531 return state_id;
1514 } 1532 }
1515 1533
1516 } // namespace gfx 1534 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698