Skip to content

Commit d9f5c7a

Browse files
author
Giorgio Ruscigno
committed
Update JetpackPromptsConfiguration, update frame and font caluclations to account for added padding in the prompt view
1 parent 36f3416 commit d9f5c7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPress/Jetpack/Classes/NUX/New Landing Screen/ViewModel/JetpackPromptsConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ struct JetpackPromptsConfiguration {
1717

1818
var prompts = [JetpackPrompt]()
1919

20-
let frameHeight = ceil(size.height / CGFloat(Constants.visibleRows))
20+
let frameHeight = ceil(size.height / CGFloat(Constants.visibleRows)) + JetpackPromptView.totalVerticalPadding
2121
self.frameHeight = frameHeight
2222

23-
let fontSize = floor(frameHeight * Constants.fontScaleFactor)
23+
let fontSize = floor((frameHeight - JetpackPromptView.totalVerticalPadding) * Constants.fontScaleFactor)
2424
self.fontSize = fontSize
2525
// sum of all the offsets + frame height of the last element = total height
2626
var cumulatedOffset: CGFloat = 0

0 commit comments

Comments
 (0)