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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.mm

Issue 2751913008: [Mac] Resize bookmark bar no item container after localizing (Closed)
Patch Set: Created 3 years, 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bookmarks/bookmark_bar_view_cocoa.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #import "chrome/browser/themes/theme_properties.h" 8 #import "chrome/browser/themes/theme_properties.h"
9 #import "chrome/browser/themes/theme_service.h" 9 #import "chrome/browser/themes/theme_service.h"
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 setFrame:NSMakeRect(NSMaxX([noItemTextfield_ frame]) + 113 setFrame:NSMakeRect(NSMaxX([noItemTextfield_ frame]) +
114 kTextFieldTrailingPadding, 114 kTextFieldTrailingPadding,
115 kInitialElementYOrigin, CGFLOAT_MAX, 115 kInitialElementYOrigin, CGFLOAT_MAX,
116 kInitialElementHeight)]; 116 kInitialElementHeight)];
117 [importBookmarksButton_ setAutoresizingMask:NSViewMaxXMargin]; 117 [importBookmarksButton_ setAutoresizingMask:NSViewMaxXMargin];
118 [importBookmarksButton_ setFont:smallSystemFont]; 118 [importBookmarksButton_ setFont:smallSystemFont];
119 [importBookmarksButton_ sizeToFit]; 119 [importBookmarksButton_ sizeToFit];
120 [noItemContainer_ addSubview:importBookmarksButton_]; 120 [noItemContainer_ addSubview:importBookmarksButton_];
121 121
122 [noItemContainer_ addSubview:noItemTextfield_]; 122 [noItemContainer_ addSubview:noItemTextfield_];
123 NSRect containerFrame = [noItemContainer_ frame];
124 containerFrame.size.width = std::max(
125 NSWidth(containerFrame), NSMaxX([importBookmarksButton_ frame]));
126 [noItemContainer_ setFrame:containerFrame];
123 127
124 [self addSubview:noItemContainer_]; 128 [self addSubview:noItemContainer_];
125 [self registerForNotificationsAndDraggedTypes]; 129 [self registerForNotificationsAndDraggedTypes];
126 } 130 }
127 return self; 131 return self;
128 } 132 }
129 133
130 - (void)registerForNotificationsAndDraggedTypes { 134 - (void)registerForNotificationsAndDraggedTypes {
131 NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter]; 135 NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
132 [defaultCenter addObserver:self 136 [defaultCenter addObserver:self
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 348
345 - (NSMenu*)menu { 349 - (NSMenu*)menu {
346 return [[controller_ menuController] menuForBookmarkBar]; 350 return [[controller_ menuController] menuForBookmarkBar];
347 } 351 }
348 352
349 - (ViewID)viewID { 353 - (ViewID)viewID {
350 return VIEW_ID_BOOKMARK_BAR; 354 return VIEW_ID_BOOKMARK_BAR;
351 } 355 }
352 356
353 @end // @implementation BookmarkBarView 357 @end // @implementation BookmarkBarView
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