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_SEPARATOR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SEPARATOR_H_ |
6 #define UI_VIEWS_CONTROLS_SEPARATOR_H_ | 6 #define UI_VIEWS_CONTROLS_SEPARATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 | 33 |
34 int size() const { return size_; } | 34 int size() const { return size_; } |
35 // Preferred size of one axis: height for horizontal separator | 35 // Preferred size of one axis: height for horizontal separator |
36 // and width for vertical separator | 36 // and width for vertical separator |
37 void SetPreferredSize(int size); | 37 void SetPreferredSize(int size); |
38 | 38 |
39 // Overridden from View: | 39 // Overridden from View: |
40 gfx::Size GetPreferredSize() const override; | 40 gfx::Size GetPreferredSize() const override; |
41 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 41 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
42 void OnPaint(gfx::Canvas* canvas) override; | 42 void OnPaint(gfx::Canvas* canvas) override; |
43 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | |
43 const char* GetClassName() const override; | 44 const char* GetClassName() const override; |
44 | 45 |
45 private: | 46 private: |
47 void SetColorFromNativeTheme(); | |
48 | |
46 const Orientation orientation_; | 49 const Orientation orientation_; |
47 SkColor color_; | 50 SkColor color_; |
Evan Stade
2017/01/10 16:58:07
if you make this base::Optional<SkColor> you don't
Tom (Use chromium acct)
2017/01/10 20:59:10
But then color() would be more complicated and it
Evan Stade
2017/01/11 00:32:04
good thing it's never actually called then
| |
51 bool color_overridden_; | |
48 int size_; | 52 int size_; |
49 | 53 |
50 DISALLOW_COPY_AND_ASSIGN(Separator); | 54 DISALLOW_COPY_AND_ASSIGN(Separator); |
51 }; | 55 }; |
52 | 56 |
53 } // namespace views | 57 } // namespace views |
54 | 58 |
55 #endif // UI_VIEWS_CONTROLS_SEPARATOR_H_ | 59 #endif // UI_VIEWS_CONTROLS_SEPARATOR_H_ |
OLD | NEW |