Merge pull request #422 from keymanapp/ios-keyboard-menu-size

Fix keyboard menu popup view width
This commit is contained in:
Gabriel Wong 2017-11-17 15:44:22 +07:00 • committed by GitHub
commit 5a5bc9cc54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ class KeyboardMenuView: UIView, UITableViewDelegate, UITableViewDataSource, UIGe
super.init(frame: mainFrame)
let screenWidth = UIScreen.main.bounds.width
let maxWidth = CGFloat.maximum(getMaxWidth(), screenWidth)
let maxWidth = CGFloat.minimum(getMaxWidth(), screenWidth)
let baseHeight = keyFrame.size.height
let containerWidth = maxWidth - strokeWidth * 2
var containerHeight = CGFloat(tableList.count) * rowHeight

View file

@ -198,7 +198,7 @@ class SubKeysView: UIView {
}
if viewRight.rounded() == keyRight.rounded() || viewRight.rounded(.down) == keyRight.rounded(.down) {
keyRight = viewRight > keyRight ? viewRight : keyRight
keyRight = CGFloat.maximum(viewRight, keyRight)
viewRight = keyRight
}