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

Side by Side Diff: chrome/browser/ui/search/search_ui.cc

Issue 10987046: NTP Omnibox height wrong for --enable-instant-extended-api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
« 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 "chrome/browser/ui/search/search_ui.h" 5 #include "chrome/browser/ui/search/search_ui.h"
6 6
7 #include "ui/gfx/font.h" 7 #include "ui/gfx/font.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 namespace search { 10 namespace search {
11 11
12 const SkColor kNTPBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5); 12 const SkColor kNTPBackgroundColor = SkColorSetRGB(0xF5, 0xF5, 0xF5);
13 const SkColor kNTPPlaceholderTextColor = SkColorSetRGB(0xBB, 0xBB, 0xBB); 13 const SkColor kNTPPlaceholderTextColor = SkColorSetRGB(0xBB, 0xBB, 0xBB);
14 const SkColor kOmniboxBackgroundColor = SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF); 14 const SkColor kOmniboxBackgroundColor = SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF);
15 const SkColor kResultsSeparatorColor = SkColorSetRGB(0xD9, 0xD9, 0xD9); 15 const SkColor kResultsSeparatorColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
16 const SkColor kSearchBackgroundColor = SK_ColorWHITE; 16 const SkColor kSearchBackgroundColor = SK_ColorWHITE;
17 const SkColor kSuggestBackgroundColor = SkColorSetRGB(0xEF, 0xEF, 0xEF); 17 const SkColor kSuggestBackgroundColor = SkColorSetRGB(0xEF, 0xEF, 0xEF);
18 18
19 const int kOmniboxFontSize = 16; 19 const int kOmniboxFontSize = 16;
20 const int kLogoYPosition = 130; 20 const int kLogoYPosition = 130;
21 const int kLogoBottomGap = 20; 21 const int kLogoBottomGap = 24;
22 const int kNTPOmniboxHeight = 40; 22 const int kNTPOmniboxHeight = 44;
23 const int kOmniboxBottomGap = 4; 23 const int kOmniboxBottomGap = 4;
24 const int kSearchResultsHeight = 122; 24 const int kSearchResultsHeight = 122;
25 25
26 gfx::Font GetNTPOmniboxFont(const gfx::Font& font) { 26 gfx::Font GetNTPOmniboxFont(const gfx::Font& font) {
27 const int kNTPOmniboxFontSize = 18; 27 const int kNTPOmniboxFontSize = 18;
28 return font.DeriveFont(kNTPOmniboxFontSize - font.GetFontSize()); 28 return font.DeriveFont(kNTPOmniboxFontSize - font.GetFontSize());
29 } 29 }
30 30
31 int GetNTPOmniboxHeight(const gfx::Font& font) { 31 int GetNTPOmniboxHeight(const gfx::Font& font) {
32 return std::max(GetNTPOmniboxFont(font).GetHeight(), kNTPOmniboxHeight); 32 return std::max(GetNTPOmniboxFont(font).GetHeight(), kNTPOmniboxHeight);
33 } 33 }
34 34
35 } // namespace search 35 } // namespace search
36 } // namespace chrome 36 } // namespace chrome
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