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

Side by Side Diff: ui/views/style/mac/combobox_background_mac.h

Issue 1904753002: MenuButton: support Mac look & feel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes :) Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 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 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_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ 5 #ifndef UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_
6 #define UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ 6 #define UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/views/background.h" 9 #include "ui/views/background.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Canvas; 12 class Canvas;
13 } 13 }
14 14
15 namespace views { 15 namespace views {
16 16
17 // This class implements the background of comboboxes. Comboboxes look like 17 // This class implements the background of comboboxes. Comboboxes look like
18 // this: 18 // this:
19 // --------------------------- 19 // ---------------------------
20 // | Option Text... | Arrows | 20 // | Option Text... | Arrows |
21 // --------------------------- 21 // ---------------------------
22 // This class colors the background of the arrows section in accordance with our 22 // This class colors the background of the arrows section in accordance with our
23 // Mac look and feel. 23 // Mac look and feel.
24 class ComboboxBackgroundMac : public Background { 24 class ComboboxBackgroundMac : public Background {
25 public: 25 public:
26 ComboboxBackgroundMac(); 26 // The |shoulder_width| argument is the desired width of the "arrows" section
27 // from the diagram above, *including* any necessary padding around the actual
28 // arrow.
29 explicit ComboboxBackgroundMac(int shoulder_width);
27 ~ComboboxBackgroundMac() override; 30 ~ComboboxBackgroundMac() override;
28 31
29 // Background: 32 // Background:
30 void Paint(gfx::Canvas* canvas, View* view) const override; 33 void Paint(gfx::Canvas* canvas, View* view) const override;
34
31 private: 35 private:
36 int width_;
tapted 2016/04/22 13:46:52 shoulder_width_
Elly Fong-Jones 2016/04/25 14:30:50 Done.
32 DISALLOW_COPY_AND_ASSIGN(ComboboxBackgroundMac); 37 DISALLOW_COPY_AND_ASSIGN(ComboboxBackgroundMac);
33 }; 38 };
34 39
35 } // namespace views 40 } // namespace views
36 41
37 #endif // UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_ 42 #endif // UI_VIEWS_STYLE_MAC_COMBOBOX_BACKGROUND_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698