Skip to content

Commit

Permalink
[Dialogs] Fix incorrect content height for non-standard dialogs (mate…
Browse files Browse the repository at this point in the history
…rial-components#9864)

Fixing content height calculations, to use the remaining space after actions and title were removed. This corrected small height misalignment for alerts without title or extra long alerts.

PiperOrigin-RevId: 299924535
  • Loading branch information
galiak11 authored Mar 11, 2020
1 parent a10704d commit ba30b6f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,8 @@ - (void)layoutSubviews {
CGFloat maxActionsHeight = CGRectGetHeight(self.bounds) / 2.0f;
actionsScrollViewRect.size.height = MIN(maxActionsHeight, actionsScrollViewRect.size.height);
}
contentScrollViewRect.size.height = CGRectGetHeight(self.bounds) -
actionsScrollViewRect.size.height -
contentScrollViewRect.origin.y;
contentScrollViewRect.size.height =
actionsScrollViewRect.origin.y - contentScrollViewRect.origin.y;

self.messageLabel.accessibilityFrame = UIAccessibilityConvertFrameToScreenCoordinates(
CGRectMake(messageFrame.origin.x, contentScrollViewRect.origin.y, messageFrame.size.width,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ba30b6f

Please sign in to comment.