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

Side by Side Diff: webkit/glue/webthemeengine_impl_win.cc

Issue 10513009: Indicate focused state on text buttons with blue outline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Created 8 years, 6 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 | « webkit/glue/webthemeengine_impl_linux.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/webthemeengine_impl_win.h" 5 #include "webkit/glue/webthemeengine_impl_win.h"
6 6
7 #include <vsstyle.h> // To convert to ui::NativeTheme::State 7 #include <vsstyle.h> // To convert to ui::NativeTheme::State
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "skia/ext/platform_canvas.h" 10 #include "skia/ext/platform_canvas.h"
(...skipping 12 matching lines...) Expand all
23 result.left = rect.x; 23 result.left = rect.x;
24 result.top = rect.y; 24 result.top = rect.y;
25 result.right = rect.x + rect.width; 25 result.right = rect.x + rect.width;
26 result.bottom = rect.y + rect.height; 26 result.bottom = rect.y + rect.height;
27 return result; 27 return result;
28 } 28 }
29 29
30 static ui::NativeTheme::State WebButtonStateToGfx( 30 static ui::NativeTheme::State WebButtonStateToGfx(
31 int part, int state, ui::NativeTheme::ButtonExtraParams* extra) { 31 int part, int state, ui::NativeTheme::ButtonExtraParams* extra) {
32 ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal; 32 ui::NativeTheme::State gfx_state = ui::NativeTheme::kNormal;
33 // Native buttons have a different focus style.
34 extra->is_focused = false;
33 35
34 if (part == BP_PUSHBUTTON) { 36 if (part == BP_PUSHBUTTON) {
35 switch (state) { 37 switch (state) {
36 case PBS_NORMAL: 38 case PBS_NORMAL:
37 gfx_state = ui::NativeTheme::kNormal; 39 gfx_state = ui::NativeTheme::kNormal;
38 extra->checked = false; 40 extra->checked = false;
39 extra->indeterminate = false; 41 extra->indeterminate = false;
40 extra->is_default = false; 42 extra->is_default = false;
41 break; 43 break;
42 case PBS_HOT: 44 case PBS_HOT:
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 extra.progress_bar.value_rect_x = valueRect.x; 975 extra.progress_bar.value_rect_x = valueRect.x;
974 extra.progress_bar.value_rect_y = valueRect.y; 976 extra.progress_bar.value_rect_y = valueRect.y;
975 extra.progress_bar.value_rect_width = valueRect.width; 977 extra.progress_bar.value_rect_width = valueRect.width;
976 extra.progress_bar.value_rect_height = valueRect.height; 978 extra.progress_bar.value_rect_height = valueRect.height;
977 ui::NativeTheme::instance()->Paint(canvas, ui::NativeTheme::kProgressBar, 979 ui::NativeTheme::instance()->Paint(canvas, ui::NativeTheme::kProgressBar,
978 ui::NativeTheme::kNormal, gfx_rect, 980 ui::NativeTheme::kNormal, gfx_rect,
979 extra); 981 extra);
980 } 982 }
981 983
982 } // namespace webkit_glue 984 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webthemeengine_impl_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698