| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h" | 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // How far to offset image column from the left. | 33 // How far to offset image column from the left. |
| 34 const CGFloat kImageXOffset = 5.0; | 34 const CGFloat kImageXOffset = 5.0; |
| 35 | 35 |
| 36 // How far to offset text. | 36 // How far to offset text. |
| 37 const CGFloat kVerticalTextPadding = 3.0; | 37 const CGFloat kVerticalTextPadding = 3.0; |
| 38 | 38 |
| 39 const CGFloat kVerticalImagePadding = 3.0; | 39 const CGFloat kVerticalImagePadding = 3.0; |
| 40 const CGFloat kMaterialVerticalImagePadding = 5.0; | 40 const CGFloat kMaterialVerticalImagePadding = 5.0; |
| 41 | 41 |
| 42 const CGFloat kTextStartOffset = 28.0; | 42 const CGFloat kTextStartOffset = 28.0; |
| 43 const CGFloat kMaterialTextStartOffset = 25.0; | 43 const CGFloat kMaterialTextStartOffset = 26.0; |
| 44 | 44 |
| 45 // Rounding radius of selection and hover background on popup items. | 45 // Rounding radius of selection and hover background on popup items. |
| 46 const CGFloat kCellRoundingRadius = 2.0; | 46 const CGFloat kCellRoundingRadius = 2.0; |
| 47 | 47 |
| 48 // How far to offset the image. | 48 // How far to offset the image. |
| 49 CGFloat VerticalImagePadding() { | 49 CGFloat VerticalImagePadding() { |
| 50 if (!ui::MaterialDesignController::IsModeMaterial()) { | 50 if (!ui::MaterialDesignController::IsModeMaterial()) { |
| 51 return kVerticalImagePadding; | 51 return kVerticalImagePadding; |
| 52 } | 52 } |
| 53 return kMaterialVerticalImagePadding; | 53 return kMaterialVerticalImagePadding; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 return base::i18n::IsRTL() ? (inputWidth - glyphOffset) : glyphOffset; | 702 return base::i18n::IsRTL() ? (inputWidth - glyphOffset) : glyphOffset; |
| 703 } | 703 } |
| 704 | 704 |
| 705 + (NSAttributedString*)createSeparatorStringForDarkTheme:(BOOL)isDarkTheme { | 705 + (NSAttributedString*)createSeparatorStringForDarkTheme:(BOOL)isDarkTheme { |
| 706 base::string16 raw_separator = | 706 base::string16 raw_separator = |
| 707 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR); | 707 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR); |
| 708 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme)); | 708 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme)); |
| 709 } | 709 } |
| 710 | 710 |
| 711 @end | 711 @end |
| OLD | NEW |