| Index: ios/chrome/browser/ui/tabs/tab_strip_controller.mm
|
| diff --git a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm
|
| index 072c4e8a772b97dac3d23bcdb019c19602358b83..a61aff54566a9f9306f4df764e2a066b21dc610d 100644
|
| --- a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm
|
| +++ b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm
|
| @@ -70,6 +70,7 @@ const CGFloat kTabOverlapForCompactLayout = 30.0;
|
|
|
| const CGFloat kNewTabOverlap = 8.0;
|
| const CGFloat kMaxTabWidth = 265.0;
|
| +const CGFloat kMaxTabWidthForCompactLayout = 225.0;
|
|
|
| // Toggle button dimensions.
|
| const CGFloat kModeToggleButtonWidth = 36.0;
|
| @@ -316,6 +317,9 @@ const CGFloat kNewTabButtonBottomOffsetHighRes = 2.0;
|
| // Returns the tab overlap width depending on the current layout mode.
|
| - (CGFloat)tabOverlap;
|
|
|
| +// Returns the maximum tab view width depending on the current layout mode.
|
| +- (CGFloat)maxTabWidth;
|
| +
|
| // Returns the minimum tab view width depending on the current layout mode.
|
| - (CGFloat)minTabWidth;
|
|
|
| @@ -1199,7 +1203,7 @@ const CGFloat kNewTabButtonBottomOffsetHighRes = 2.0;
|
| CGFloat visibleSpace = [self tabStripVisibleSpace];
|
| _currentTabWidth =
|
| (visibleSpace + ([self tabOverlap] * (tabCount - 1))) / tabCount;
|
| - _currentTabWidth = MIN(_currentTabWidth, kMaxTabWidth);
|
| + _currentTabWidth = MIN(_currentTabWidth, [self maxTabWidth]);
|
| _currentTabWidth = MAX(_currentTabWidth, [self minTabWidth]);
|
|
|
| // Set the content size to be large enough to contain all the tabs at the
|
| @@ -1259,6 +1263,10 @@ const CGFloat kNewTabButtonBottomOffsetHighRes = 2.0;
|
| return IsCompactTablet() ? kTabOverlapForCompactLayout : kTabOverlap;
|
| }
|
|
|
| +- (CGFloat)maxTabWidth {
|
| + return IsCompactTablet() ? kMaxTabWidthForCompactLayout : kMaxTabWidth;
|
| +}
|
| +
|
| - (CGFloat)minTabWidth {
|
| return IsCompactTablet() ? kMinTabWidthForCompactLayout : kMinTabWidth;
|
| }
|
|
|