OLD | NEW |
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 #ifndef UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ |
6 #define UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ | 6 #define UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/views/border.h" | 10 #include "ui/views/border.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Canvas; | 14 class Canvas; |
15 class Insets; | 15 class Insets; |
16 } | 16 } |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 // A Border class to draw a focused border around a field (e.g textfield). | 20 // A Border class to draw a focused border around a field (e.g textfield). |
21 class VIEWS_EXPORT FocusableBorder : public Border { | 21 class VIEWS_EXPORT FocusableBorder : public Border { |
22 public: | 22 public: |
23 static constexpr float kCornerRadiusDp = 1.5f; | 23 static constexpr float kCornerRadiusDp = 2.f; |
24 | 24 |
25 FocusableBorder(); | 25 FocusableBorder(); |
26 ~FocusableBorder() override; | 26 ~FocusableBorder() override; |
27 | 27 |
28 // Sets the insets of the border. | 28 // Sets the insets of the border. |
29 void SetInsets(int top, int left, int bottom, int right); | 29 void SetInsets(int top, int left, int bottom, int right); |
30 | 30 |
31 // Sets the color of this border. | 31 // Sets the color of this border. |
32 void SetColor(SkColor color); | 32 void SetColor(SkColor color); |
33 // Reverts the color of this border to the system default. | 33 // Reverts the color of this border to the system default. |
(...skipping 16 matching lines...) Expand all Loading... |
50 // Whether the system border color should be used. True unless SetColor has | 50 // Whether the system border color should be used. True unless SetColor has |
51 // been called. | 51 // been called. |
52 bool use_default_color_; | 52 bool use_default_color_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); | 54 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace views | 57 } // namespace views |
58 | 58 |
59 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ | 59 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ |
OLD | NEW |