diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 14:17:48 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 14:17:48 +0000 |
commit | 85371680aa80277e4c1cd4e7b17cca7ee37d5fac (patch) | |
tree | deb66ad94cb223d138bcc44596a1b78fdf828f6b /ui/gfx/native_theme_win.cc | |
parent | 0a4385d2df328972de64a25b4e26c6e8ceb15435 (diff) | |
download | chromium_src-85371680aa80277e4c1cd4e7b17cca7ee37d5fac.zip chromium_src-85371680aa80277e4c1cd4e7b17cca7ee37d5fac.tar.gz chromium_src-85371680aa80277e4c1cd4e7b17cca7ee37d5fac.tar.bz2 |
Fix scrollbar buttons in classic windows theme. When I refactored the code
a few weeks ago, it seems a code path that was not being used before is now
called. Added support to draw the scroll buttons in the correct orientation.
BUG=92773
TEST=Run chrome in classic windows theme. Open the NTP and resize it to make
it small enough so that scroll bars appeat both horizontally and vertically.
Make sure all four scrollbar buttons appear in the correct orientation.
Review URL: http://codereview.chromium.org/7008013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/native_theme_win.cc')
-rw-r--r-- | ui/gfx/native_theme_win.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ui/gfx/native_theme_win.cc b/ui/gfx/native_theme_win.cc index ba33651..7363d96 100644 --- a/ui/gfx/native_theme_win.cc +++ b/ui/gfx/native_theme_win.cc @@ -261,8 +261,26 @@ HRESULT NativeThemeWin::PaintScrollbarArrow( 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; } |