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

Side by Side Diff: ui/views/controls/combobox/combobox.cc

Issue 2342783004: views: use MD padding for combobox (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698