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

Side by Side Diff: ui/views/controls/focusable_border.h

Issue 516943003: Add textfield internal padding from FocusableBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore Insets const ref. Created 6 years, 3 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
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/focusable_border.cc » ('j') | 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) 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/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.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 FocusableBorder(); 23 FocusableBorder();
24 virtual ~FocusableBorder();
24 25
25 // Sets the insets of the border. 26 // Sets the insets of the border.
26 void SetInsets(int top, int left, int bottom, int right); 27 void SetInsets(int top, int left, int bottom, int right);
27 28
28 // Sets the color of this border. 29 // Sets the color of this border.
29 void SetColor(SkColor color); 30 void SetColor(SkColor color);
30 // Reverts the color of this border to the system default. 31 // Reverts the color of this border to the system default.
31 void UseDefaultColor(); 32 void UseDefaultColor();
32 33
33 // Overridden from Border: 34 // Overridden from Border:
(...skipping 10 matching lines...) Expand all
44 // Whether the system border color should be used. True unless SetColor has 45 // Whether the system border color should be used. True unless SetColor has
45 // been called. 46 // been called.
46 bool use_default_color_; 47 bool use_default_color_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(FocusableBorder); 49 DISALLOW_COPY_AND_ASSIGN(FocusableBorder);
49 }; 50 };
50 51
51 } // namespace views 52 } // namespace views
52 53
53 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_ 54 #endif // UI_VIEWS_CONTROLS_FOCUSABLE_BORDER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/focusable_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698