Commit 8545be95 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Reduces height of DiscoverFeed header

Comparison image:
https://drive.google.com/file/d/1YqxC7U2VQ_X318GDHVmu6tOJnEblOQFs/view?usp=sharing
(Left:New Right:Old)

Bug: 1085419
Change-Id: I0ba685cf36db42e41daf11d7735600cffb5408a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355310
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Auto-Submit: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798207}
parent 52b083f6
...@@ -27,7 +27,7 @@ const CGFloat kHeaderBorderMargin = 16; ...@@ -27,7 +27,7 @@ const CGFloat kHeaderBorderMargin = 16;
// Font size for label text in header. // Font size for label text in header.
const CGFloat kDiscoverFeedTitleFontSize = 16; const CGFloat kDiscoverFeedTitleFontSize = 16;
// Insets for header menu button. // Insets for header menu button.
const CGFloat kHeaderMenuButtonInsetTopAndBottom = 11; const CGFloat kHeaderMenuButtonInsetTopAndBottom = 2;
const CGFloat kHeaderMenuButtonInsetSides = 2; const CGFloat kHeaderMenuButtonInsetSides = 2;
// Duration for the header animation when Discover feed visibility changes. // Duration for the header animation when Discover feed visibility changes.
const CGFloat kHeaderChangeAnimationDuration = 0.5; const CGFloat kHeaderChangeAnimationDuration = 0.5;
......
...@@ -53,6 +53,8 @@ const CGFloat kCardBorderRadius = 11; ...@@ -53,6 +53,8 @@ const CGFloat kCardBorderRadius = 11;
const CGFloat kDiscoverFeedContentWith = 430; const CGFloat kDiscoverFeedContentWith = 430;
// Value representing offset from bottom of the page to trigger pagination. // Value representing offset from bottom of the page to trigger pagination.
const CGFloat kPaginationOffset = 100; const CGFloat kPaginationOffset = 100;
// Height for the Discover Feed section header.
const CGFloat kDiscoverFeedFeaderHeight = 30;
} }
NSString* const kContentSuggestionsMostVisitedAccessibilityIdentifierPrefix = NSString* const kContentSuggestionsMostVisitedAccessibilityIdentifierPrefix =
...@@ -605,6 +607,9 @@ NSString* const kContentSuggestionsMostVisitedAccessibilityIdentifierPrefix = ...@@ -605,6 +607,9 @@ NSString* const kContentSuggestionsMostVisitedAccessibilityIdentifierPrefix =
if ([self.collectionUpdater isHeaderSection:section]) { if ([self.collectionUpdater isHeaderSection:section]) {
return CGSizeMake(0, [self.headerSynchronizer headerHeight]); return CGSizeMake(0, [self.headerSynchronizer headerHeight]);
} }
if ([self.collectionUpdater isDiscoverSection:section]) {
return CGSizeMake(0, kDiscoverFeedFeaderHeight);
}
CGSize defaultSize = [super collectionView:collectionView CGSize defaultSize = [super collectionView:collectionView
layout:collectionViewLayout layout:collectionViewLayout
referenceSizeForHeaderInSection:section]; referenceSizeForHeaderInSection:section];
......
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