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

Side by Side Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller.mm

Issue 2256883004: add padding for icon on advance view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/translate/translate_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 kRelatedControlVerticalSpacing; 602 kRelatedControlVerticalSpacing;
603 603
604 [sourceLanguageLabel setFrameOrigin:NSMakePoint( 604 [sourceLanguageLabel setFrameOrigin:NSMakePoint(
605 textLabelWidth - NSWidth([sourceLanguageLabel frame]), yPos + diffY)]; 605 textLabelWidth - NSWidth([sourceLanguageLabel frame]), yPos + diffY)];
606 606
607 frame = [sourcePopUpButton frame]; 607 frame = [sourcePopUpButton frame];
608 frame.origin = NSMakePoint(textLabelWidth, yPos); 608 frame.origin = NSMakePoint(textLabelWidth, yPos);
609 frame.size.width = NSWidth([targetPopUpButton frame]); 609 frame.size.width = NSWidth([targetPopUpButton frame]);
610 [sourcePopUpButton setFrame:frame]; 610 [sourcePopUpButton setFrame:frame];
611 611
612 [view setFrameSize:NSMakeSize(kContentWidth, 612 [view
613 NSMaxY([sourcePopUpButton frame]))]; 613 setFrameSize:NSMakeSize(kContentWidth, NSMaxY([sourcePopUpButton frame]) +
614 kIconPadding)];
614 615
615 [self updateAdvancedView]; 616 [self updateAdvancedView];
616 617
617 return view; 618 return view;
618 } 619 }
619 620
620 - (void)updateAdvancedView { 621 - (void)updateAdvancedView {
621 NSString* title; 622 NSString* title;
622 if (model_->IsPageTranslatedInCurrentLanguages()) 623 if (model_->IsPageTranslatedInCurrentLanguages())
623 title = l10n_util::GetNSStringWithFixup(IDS_DONE); 624 title = l10n_util::GetNSStringWithFixup(IDS_DONE);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // source or target language on the before translate view. 879 // source or target language on the before translate view.
879 - (BOOL)textView:(NSTextView*)aTextView 880 - (BOOL)textView:(NSTextView*)aTextView
880 clickedOnLink:(id)link 881 clickedOnLink:(id)link
881 atIndex:(NSUInteger)charIndex { 882 atIndex:(NSUInteger)charIndex {
882 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); 883 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED);
883 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; 884 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED];
884 return YES; 885 return YES;
885 } 886 }
886 887
887 @end 888 @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