Commit ceae2654 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Revert back to a card style for settings.

The card style is now disabled behind a new IsSettingsUIRebootEnabled()
experimental flag.

These changes were inadvertently landed as part of
https://chromium-review.googlesource.com/c/chromium/src/+/1114605.

BUG=805213

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I7c22b635199810bab3332443e8a9251c073ca245
Reviewed-on: https://chromium-review.googlesource.com/1116919Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570748}
parent 606ee9b3
......@@ -72,6 +72,9 @@ bool IsReadingListUIRebootEnabled();
// Whether the Collections UI Reboot is enabled.
bool IsCollectionsUIRebootEnabled();
// Whether the Settings UI Reboot is enabled.
bool IsSettingsUIRebootEnabled();
// Whether the application group sandbox must be cleared before starting.
// Calling this method will reset the flag to false, so the sandbox is cleared
// only once.
......
......@@ -151,4 +151,8 @@ bool IsCollectionsUIRebootEnabled() {
return base::FeatureList::IsEnabled(kCollectionsUIReboot);
}
bool IsSettingsUIRebootEnabled() {
return base::FeatureList::IsEnabled(kCollectionsUIReboot);
}
} // namespace experimental_flags
......@@ -8,6 +8,7 @@
#import "base/mac/foundation_util.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#import "ios/chrome/browser/experimental_flags.h"
#import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/open_url_command.h"
#import "ios/chrome/browser/ui/settings/bar_button_activity_indicator.h"
......@@ -53,9 +54,15 @@ const CGFloat kActivityIndicatorDimensionIPhone = 56;
self.collectionViewAccessibilityIdentifier;
// Customize collection view settings.
self.collectionView.backgroundColor = [UIColor groupTableViewBackgroundColor];
self.styler.cellStyle = MDCCollectionViewCellStyleGrouped;
self.styler.separatorInset = UIEdgeInsetsMake(0, 48, 0, 0);
if (experimental_flags::IsSettingsUIRebootEnabled()) {
self.collectionView.backgroundColor =
[UIColor groupTableViewBackgroundColor];
self.styler.cellStyle = MDCCollectionViewCellStyleGrouped;
self.styler.separatorInset = UIEdgeInsetsMake(0, 48, 0, 0);
} else {
self.styler.cellStyle = MDCCollectionViewCellStyleCard;
self.styler.separatorInset = UIEdgeInsetsMake(0, 16, 0, 16);
}
}
- (void)viewWillAppear:(BOOL)animated {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment