OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/autofill/autofill_account_chooser.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h" |
6 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
9 #include "chrome/browser/ui/chrome_style.h" | 9 #include "chrome/browser/ui/chrome_style.h" |
10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" | 10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 - (void)performLayout { | 136 - (void)performLayout { |
137 NSRect bounds = [self bounds]; | 137 NSRect bounds = [self bounds]; |
138 | 138 |
139 NSControl* activeControl = [link_ isHidden] ? popup_.get() : link_.get(); | 139 NSControl* activeControl = [link_ isHidden] ? popup_.get() : link_.get(); |
140 [activeControl sizeToFit]; | 140 [activeControl sizeToFit]; |
141 NSRect frame = [activeControl frame]; | 141 NSRect frame = [activeControl frame]; |
142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); | 142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); |
143 [activeControl setFrame:frame]; | 143 [activeControl setFrame:frame]; |
144 | 144 |
145 [icon_ setFrameSize:[[icon_ image] size]]; | 145 [icon_ setFrameSize:[[icon_ image] size]]; |
146 frame.origin.x -= NSWidth([icon_ frame]) + kAroundTextPadding; | 146 frame.origin.x -= NSWidth([icon_ frame]) + autofill::kAroundTextPadding; |
147 [icon_ setFrameOrigin:frame.origin]; | 147 [icon_ setFrameOrigin:frame.origin]; |
148 } | 148 } |
149 | 149 |
150 @end | 150 @end |
151 | 151 |
OLD | NEW |