diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 07:03:55 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 07:03:55 +0000 |
commit | 5d529b0e998fe75335a886cdfee16f53fbfc2da2 (patch) | |
tree | d9e29b0e04cd8d6123711c5d51d0536ec908c0d9 /ui/app_list | |
parent | 5af43c1305f267de66ba64a32ee98f8d6aa3b7cc (diff) | |
download | chromium_src-5d529b0e998fe75335a886cdfee16f53fbfc2da2.zip chromium_src-5d529b0e998fe75335a886cdfee16f53fbfc2da2.tar.gz chromium_src-5d529b0e998fe75335a886cdfee16f53fbfc2da2.tar.bz2 |
[win] Position app launcher search edit correctly
On Windows the edit is too high, causing the text to appear at the very top of the app list. On ChromeOS it is fine as it is drawn centered, but on Windows it is drawn at the top. The fix is to position the edit in the center.
BUG=151680
Review URL: https://chromiumcodereview.appspot.com/11363095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r-- | ui/app_list/search_box_view.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/app_list/search_box_view.cc b/ui/app_list/search_box_view.cc index 145570d..d0e3381 100644 --- a/ui/app_list/search_box_view.cc +++ b/ui/app_list/search_box_view.cc @@ -22,6 +22,7 @@ const int kIconDimension = 32; const int kPreferredWidth = 360; const int kPreferredHeight = 48; const int kFontSize = 14; +const int kEditHeight = 19; const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0); @@ -82,6 +83,7 @@ void SearchBoxView::Layout() { gfx::Rect edit_frame(rect); edit_frame.set_x(icon_frame.right()); edit_frame.set_width(rect.width() - icon_frame.width() - kPadding); + edit_frame.ClampToCenteredSize(gfx::Size(edit_frame.width(), kEditHeight)); search_box_->SetBoundsRect(edit_frame); } |