| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ | |
| 6 #define UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/views/background.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class Canvas; | |
| 13 } | |
| 14 | |
| 15 namespace views { | |
| 16 | |
| 17 // This class implements the background of comboboxes. Comboboxes look like | |
| 18 // this: | |
| 19 // --------------------------- | |
| 20 // | Option Text... | Arrows | | |
| 21 // --------------------------- | |
| 22 // This class colors the background of the arrows section in accordance with our | |
| 23 // Mac look and feel. | |
| 24 class ComboboxBackgroundMac : public Background { | |
| 25 public: | |
| 26 // The |container_width| argument is the width of the "arrows" section from | |
| 27 // the diagram above, including any necessary padding around the actual arrow. | |
| 28 explicit ComboboxBackgroundMac(int container_width); | |
| 29 ~ComboboxBackgroundMac() override; | |
| 30 | |
| 31 // Background: | |
| 32 void Paint(gfx::Canvas* canvas, View* view) const override; | |
| 33 | |
| 34 private: | |
| 35 int container_width_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(ComboboxBackgroundMac); | |
| 38 }; | |
| 39 | |
| 40 } // namespace views | |
| 41 | |
| 42 #endif // UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ | |
| OLD | NEW |