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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm

Issue 1977013003: [Mac][Material] Add 1pt to the text in the Omnibox dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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
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
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
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