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

Unified Diff: chrome/browser/cocoa/content_settings_dialog_controller.mm

Issue 2534001: Mac: Change content settings from showing tabs on top to showing a list on the side. (Closed)
Patch Set: commenst Created 10 years, 7 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 | « chrome/app/nibs/ContentSettings.xib ('k') | chrome/browser/cocoa/tab_view_picker_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/content_settings_dialog_controller.mm
diff --git a/chrome/browser/cocoa/content_settings_dialog_controller.mm b/chrome/browser/cocoa/content_settings_dialog_controller.mm
index fcca2821c45208310fd5f19d1c6e86e8a4c80c5d..3f792e3c57db52ccd6a0d2a34dd399d97504cb6c 100644
--- a/chrome/browser/cocoa/content_settings_dialog_controller.mm
+++ b/chrome/browser/cocoa/content_settings_dialog_controller.mm
@@ -44,13 +44,20 @@ const NSInteger kGeolocationAskIndex = 1;
const NSInteger kGeolocationDisabledIndex = 2;
// Walks views in top-down order, wraps each to their current width, and moves
-// the latter ones down to prevernt overlaps.
+// the latter ones down to prevent overlaps.
CGFloat VerticallyReflowGroup(NSArray* views) {
views = [views sortedArrayUsingFunction:cocoa_l10n_util::CompareFrameY
context:NULL];
CGFloat localVerticalShift = 0;
for (NSInteger index = [views count] - 1; index >= 0; --index) {
NSView* view = [views objectAtIndex:index];
+
+ // Since the tab pane is in a horizontal resizer in IB, it's convenient
+ // to give all the subviews flexible width so that their sizes are
+ // autoupdated in IB. However, in chrome, the subviews shouldn't have
+ // flexible widths as this looks weird.
+ [view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
+
NSSize delta = cocoa_l10n_util::WrapOrSizeToFit(view);
localVerticalShift += delta.height;
if (localVerticalShift) {
« no previous file with comments | « chrome/app/nibs/ContentSettings.xib ('k') | chrome/browser/cocoa/tab_view_picker_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698