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

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

Issue 7849007: Fix windows classic scrollbar buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 case kScrollbarRightArrow: 360 case kScrollbarRightArrow:
361 classic_state = DFCS_SCROLLRIGHT; 361 classic_state = DFCS_SCROLLRIGHT;
362 break; 362 break;
363 case kScrollbarUpArrow: 363 case kScrollbarUpArrow:
364 classic_state = DFCS_SCROLLUP; 364 classic_state = DFCS_SCROLLUP;
365 break; 365 break;
366 default: 366 default:
367 NOTREACHED() << "Invalid part: " << part; 367 NOTREACHED() << "Invalid part: " << part;
368 break; 368 break;
369 } 369 }
370 370 switch(state) {
371 case kDisabled:
372 classic_state |= DFCS_INACTIVE;
373 break;
374 case kHovered:
375 classic_state |= DFCS_HOT;
376 break;
377 case kNormal:
378 break;
379 case kPressed:
380 classic_state |= DFCS_PUSHED;
381 break;
382 default:
383 NOTREACHED() << "Invalid state: " << state;
384 break;
385 }
371 DrawFrameControl(hdc, &rect_win, DFC_SCROLL, classic_state); 386 DrawFrameControl(hdc, &rect_win, DFC_SCROLL, classic_state);
372 return S_OK; 387 return S_OK;
373 } 388 }
374 389
375 HRESULT NativeThemeWin::PaintScrollbarTrack( 390 HRESULT NativeThemeWin::PaintScrollbarTrack(
376 SkCanvas* canvas, 391 SkCanvas* canvas,
377 HDC hdc, 392 HDC hdc,
378 Part part, 393 Part part,
379 State state, 394 State state,
380 const gfx::Rect& rect, 395 const gfx::Rect& rect,
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 } 1668 }
1654 break; 1669 break;
1655 default: 1670 default:
1656 NOTREACHED() << "Invalid part: " << part; 1671 NOTREACHED() << "Invalid part: " << part;
1657 break; 1672 break;
1658 } 1673 }
1659 return state_id; 1674 return state_id;
1660 } 1675 }
1661 1676
1662 } // namespace gfx 1677 } // 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