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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 1900873004: [Mac][Material Design] Add space between icon and text in location bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index ca33657b14d0dff8605484b03c4dbdfc727d9b95..2bc741b3aae4ee02b7c3d3064189d7b71cd9dbb5 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -248,8 +248,11 @@ size_t CalculatePositionsInFrame(
// Material Design spec. It turns out this adjustment is equal to the single
// pixel line width (so 1 on non-Retina, 0.5 on Retina). Make this adjustment
// after computing decoration positions because the decorations are already
- // correctly positioned.
+ // correctly positioned. The spec also calls for positioning the text 1pt to
+ // the right of its default position.
if (ui::MaterialDesignController::IsModeMaterial()) {
+ textFrame.origin.x += 1;
+ textFrame.size.width -= 1;
textFrame.origin.y -= singlePixelLineWidth_;
}
« 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