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

Unified Diff: ui/views/controls/combobox/combobox.h

Issue 2069733002: MD - Use real comboboxes in website settings popup. Hide borders (but (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/combobox/combobox.h
diff --git a/ui/views/controls/combobox/combobox.h b/ui/views/controls/combobox/combobox.h
index a3112c7eb9cde23f28b21540bd644672fe5810f3..857799708c09419cc90d619c54a84e277c5d8e52 100644
--- a/ui/views/controls/combobox/combobox.h
+++ b/ui/views/controls/combobox/combobox.h
@@ -105,6 +105,11 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
// Overriden from ButtonListener:
void ButtonPressed(Button* sender, const ui::Event& event) override;
+ protected:
+ void set_size_to_largest_label(bool size_to_largest_label) {
+ size_to_largest_label_ = size_to_largest_label;
sky 2016/06/16 21:58:55 Why do you need to change this? It makes sense for
Evan Stade 2016/06/16 22:04:32 We're getting rid of the border, and it just looks
+ }
+
private:
friend class test::ComboboxTestApi;
@@ -204,6 +209,10 @@ class VIEWS_EXPORT Combobox : public PrefixDelegate, public ButtonListener {
// The image to be drawn for this combobox's arrow.
gfx::ImageSkia arrow_image_;
+ // When true, the size of contents is defined by the selected label.
+ // Otherwise, it's defined by the widest label in the menu.
+ bool size_to_largest_label_;
+
// Used for making calbacks.
base::WeakPtrFactory<Combobox> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698