OLD | NEW |
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 #include "ui/views/controls/combobox/combobox.h" | 5 #include "ui/views/controls/combobox/combobox.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 return gfx::Size(width, font_list.GetHeight()); | 984 return gfx::Size(width, font_list.GetHeight()); |
985 } | 985 } |
986 | 986 |
987 PrefixSelector* Combobox::GetPrefixSelector() { | 987 PrefixSelector* Combobox::GetPrefixSelector() { |
988 if (!selector_) | 988 if (!selector_) |
989 selector_.reset(new PrefixSelector(this, this)); | 989 selector_.reset(new PrefixSelector(this, this)); |
990 return selector_.get(); | 990 return selector_.get(); |
991 } | 991 } |
992 | 992 |
993 int Combobox::GetArrowContainerWidth() const { | 993 int Combobox::GetArrowContainerWidth() const { |
| 994 const int kMdPaddingWidth = 8; |
| 995 int arrow_pad = UseMd() ? kMdPaddingWidth |
| 996 : PlatformStyle::kComboboxNormalArrowPadding; |
994 int padding = style_ == STYLE_NORMAL | 997 int padding = style_ == STYLE_NORMAL |
995 ? PlatformStyle::kComboboxNormalArrowPadding * 2 | 998 ? arrow_pad * 2 |
996 : kActionLeftPadding + kActionRightPadding; | 999 : kActionLeftPadding + kActionRightPadding; |
997 return ArrowSize().width() + padding; | 1000 return ArrowSize().width() + padding; |
998 } | 1001 } |
999 | 1002 |
1000 } // namespace views | 1003 } // namespace views |
OLD | NEW |