OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/resource_bundle.h" | |
6 #include "chrome/browser/chromeos/views/dropdown_button.h" | 5 #include "chrome/browser/chromeos/views/dropdown_button.h" |
7 #include "gfx/canvas_skia.h" | 6 #include "gfx/canvas_skia.h" |
8 #include "grit/theme_resources.h" | 7 #include "grit/theme_resources.h" |
| 8 #include "ui/base/resource/resource_bundle.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 // Asset icon particularities makes us offset focus frame. | 11 // Asset icon particularities makes us offset focus frame. |
12 const int kFocusFrameTopOffset = 0; | 12 const int kFocusFrameTopOffset = 0; |
13 const int kFocusFrameLeftOffset = 0; | 13 const int kFocusFrameLeftOffset = 0; |
14 const int kFocusFrameRightOffset = 0; | 14 const int kFocusFrameRightOffset = 0; |
15 const int kFocusFrameBottomOffset = 1; | 15 const int kFocusFrameBottomOffset = 1; |
16 | 16 |
17 // TextButtonBorder specification that uses different icons to draw the | 17 // TextButtonBorder specification that uses different icons to draw the |
18 // button. | 18 // button. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 | 65 |
66 void DropDownButton::PaintFocusBorder(gfx::Canvas* canvas) { | 66 void DropDownButton::PaintFocusBorder(gfx::Canvas* canvas) { |
67 if (HasFocus() && (IsFocusable() || IsAccessibilityFocusableInRootView())) | 67 if (HasFocus() && (IsFocusable() || IsAccessibilityFocusableInRootView())) |
68 canvas->DrawFocusRect(kFocusFrameLeftOffset, kFocusFrameTopOffset, | 68 canvas->DrawFocusRect(kFocusFrameLeftOffset, kFocusFrameTopOffset, |
69 width() - kFocusFrameRightOffset, | 69 width() - kFocusFrameRightOffset, |
70 height() - kFocusFrameBottomOffset); | 70 height() - kFocusFrameBottomOffset); |
71 } | 71 } |
72 | 72 |
73 } // namespace chromeos | 73 } // namespace chromeos |
OLD | NEW |