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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_section_container.mm

Issue 23498027: [rAC, OSX] labels should not draw background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« 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 (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_section_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 - (NSTextField*)makeDetailSectionLabel:(NSString*)labelText { 461 - (NSTextField*)makeDetailSectionLabel:(NSString*)labelText {
462 base::scoped_nsobject<NSTextField> label([[NSTextField alloc] init]); 462 base::scoped_nsobject<NSTextField> label([[NSTextField alloc] init]);
463 [label setFont: 463 [label setFont:
464 [[NSFontManager sharedFontManager] convertFont:[label font] 464 [[NSFontManager sharedFontManager] convertFont:[label font]
465 toHaveTrait:NSBoldFontMask]]; 465 toHaveTrait:NSBoldFontMask]];
466 [label setStringValue:labelText]; 466 [label setStringValue:labelText];
467 [label setEditable:NO]; 467 [label setEditable:NO];
468 [label setBordered:NO]; 468 [label setBordered:NO];
469 [label setDrawsBackground:NO];
469 [label sizeToFit]; 470 [label sizeToFit];
470 return label.autorelease(); 471 return label.autorelease();
471 } 472 }
472 473
473 - (void)updateAndClobber:(BOOL)shouldClobber { 474 - (void)updateAndClobber:(BOOL)shouldClobber {
474 const autofill::DetailInputs& updatedInputs = 475 const autofill::DetailInputs& updatedInputs =
475 delegate_->RequestedFieldsForSection(section_); 476 delegate_->RequestedFieldsForSection(section_);
476 477
477 for (autofill::DetailInputs::const_iterator iter = updatedInputs.begin(); 478 for (autofill::DetailInputs::const_iterator iter = updatedInputs.begin();
478 iter != updatedInputs.end(); 479 iter != updatedInputs.end();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 622
622 - (void)activateFieldForInput:(const autofill::DetailInput&)input { 623 - (void)activateFieldForInput:(const autofill::DetailInput&)input {
623 if ([self detailInputForType:input.type] != &input) 624 if ([self detailInputForType:input.type] != &input)
624 return; 625 return;
625 626
626 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type]; 627 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type];
627 [[field window] makeFirstResponder:field]; 628 [[field window] makeFirstResponder:field];
628 } 629 }
629 630
630 @end 631 @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