| 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 "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 |
| OLD | NEW |