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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_theme_win.cc
===================================================================
--- ui/gfx/native_theme_win.cc (revision 86623)
+++ ui/gfx/native_theme_win.cc (working copy)
@@ -261,8 +261,26 @@
return draw_theme_(handle, hdc, SBP_ARROWBTN, state_id, &rect_win, NULL);
}
- // TODO: Draw it manually.
- DrawFrameControl(hdc, &rect_win, DFC_SCROLL, 0);
+ int classic_state = DFCS_SCROLLDOWN;
+ switch(part) {
+ case kScrollbarDownArrow:
+ classic_state = DFCS_SCROLLDOWN;
+ break;
+ case kScrollbarLeftArrow:
+ classic_state = DFCS_SCROLLLEFT;
+ break;
+ case kScrollbarRightArrow:
+ classic_state = DFCS_SCROLLRIGHT;
+ break;
+ case kScrollbarUpArrow:
+ classic_state = DFCS_SCROLLUP;
+ break;
+ default:
+ NOTREACHED() << "Invalid part: " << part;
+ break;
+ }
+
+ DrawFrameControl(hdc, &rect_win, DFC_SCROLL, classic_state);
return S_OK;
}
« 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