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

Side by Side Diff: ui/gfx/geometry/insets_f.h

Issue 1800973002: MD text buttons - implement focus ring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 #ifndef UI_GFX_GEOMETRY_INSETS_F_H_ 5 #ifndef UI_GFX_GEOMETRY_INSETS_F_H_
6 #define UI_GFX_GEOMETRY_INSETS_F_H_ 6 #define UI_GFX_GEOMETRY_INSETS_F_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 // A floating point version of gfx::Insets. 14 // A floating point version of gfx::Insets.
15 class GFX_EXPORT InsetsF { 15 class GFX_EXPORT InsetsF {
16 public: 16 public:
17 InsetsF(); 17 InsetsF();
18 explicit InsetsF(float all);
19 InsetsF(float vertical, float horizontal);
18 InsetsF(float top, float left, float bottom, float right); 20 InsetsF(float top, float left, float bottom, float right);
21
19 ~InsetsF(); 22 ~InsetsF();
20 23
21 float top() const { return top_; } 24 float top() const { return top_; }
22 float left() const { return left_; } 25 float left() const { return left_; }
23 float bottom() const { return bottom_; } 26 float bottom() const { return bottom_; }
24 float right() const { return right_; } 27 float right() const { return right_; }
25 28
26 // Returns the total width taken up by the insets, which is the sum of the 29 // Returns the total width taken up by the insets, which is the sum of the
27 // left and right insets. 30 // left and right insets.
28 float width() const { return left_ + right_; } 31 float width() const { return left_ + right_; }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 private: 70 private:
68 float top_; 71 float top_;
69 float left_; 72 float left_;
70 float bottom_; 73 float bottom_;
71 float right_; 74 float right_;
72 }; 75 };
73 76
74 } // namespace gfx 77 } // namespace gfx
75 78
76 #endif // UI_GFX_GEOMETRY_INSETS_F_H_ 79 #endif // UI_GFX_GEOMETRY_INSETS_F_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698