Commit b67a50da authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Updating layout constraints in sign-in view

Enforcing the layout constraint for 20% image height in the sign-in
view.

https://drive.google.com/open?id=1hwaiM1Oj3C_mLUQQqvzwNwSmJwVB_rIk
(blue and yellow color are just for debug reasons, not part of this
patch)

Related:
https://chromium-review.googlesource.com/c/chromium/src/+/1543399

Bug: 971989
Change-Id: Id4f1792203dfb11e70dea715ef2700b74e1b5cd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2139714Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Auto-Submit: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757033}
parent 21f54188
...@@ -62,9 +62,6 @@ const char* const kSettingsSyncURL = "internal://settings-sync"; ...@@ -62,9 +62,6 @@ const char* const kSettingsSyncURL = "internal://settings-sync";
// Constraint for the maximum height of the header view (also used to hide the // Constraint for the maximum height of the header view (also used to hide the
// the header view if needed). // the header view if needed).
@property(nonatomic, strong) NSLayoutConstraint* headerViewMaxHeightConstraint; @property(nonatomic, strong) NSLayoutConstraint* headerViewMaxHeightConstraint;
// Constraint for the proportiortional size of the header view.
@property(nonatomic, strong)
NSLayoutConstraint* headerViewProportionalHeightConstraint;
// Settings link controller. // Settings link controller.
@property(nonatomic, strong) LabelLinkController* settingsLinkController; @property(nonatomic, strong) LabelLinkController* settingsLinkController;
// Label related to customize sync text. // Label related to customize sync text.
...@@ -253,12 +250,10 @@ const char* const kSettingsSyncURL = "internal://settings-sync"; ...@@ -253,12 +250,10 @@ const char* const kSettingsSyncURL = "internal://settings-sync";
AddSameCenterXConstraint(self.view, headerImageView); AddSameCenterXConstraint(self.view, headerImageView);
// |headerView| fills 20% of |view|, capped at // |headerView| fills 20% of |view|, capped at
// |kAuthenticationHeaderImageHeight|. // |kAuthenticationHeaderImageHeight|.
self.headerViewProportionalHeightConstraint = [headerImageView.heightAnchor [headerImageView.heightAnchor
constraintEqualToAnchor:self.view.heightAnchor constraintLessThanOrEqualToAnchor:self.view.heightAnchor
multiplier:0.2]; multiplier:0.2]
self.headerViewProportionalHeightConstraint.priority = .active = YES;
UILayoutPriorityDefaultHigh;
self.headerViewProportionalHeightConstraint.active = YES;
self.headerViewMaxHeightConstraint = [headerImageView.heightAnchor self.headerViewMaxHeightConstraint = [headerImageView.heightAnchor
constraintLessThanOrEqualToConstant:kAuthenticationHeaderImageHeight]; constraintLessThanOrEqualToConstant:kAuthenticationHeaderImageHeight];
self.headerViewMaxHeightConstraint.active = YES; self.headerViewMaxHeightConstraint.active = YES;
......
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