Skip to content

Commit

Permalink
Fixes #179, oversized barView permissionLevelButton
Browse files Browse the repository at this point in the history
  • Loading branch information
robomex committed Sep 20, 2019
1 parent aa8a3e1 commit c1e065b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions XRViewer/WebController/BarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ class BarView: UIView, UITextFieldDelegate {
permissionButton.setImage(nil, for: .normal)
permissionButton.addTarget(self, action: #selector(BarView.showPermissionsAction(_:)), for: .touchUpInside)
permissionButton.frame = CGRect(x: 0, y: 0, width: CGFloat(URL_FIELD_HEIGHT), height: CGFloat(URL_FIELD_HEIGHT))
permissionButton.imageEdgeInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5)
permissionButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)
permissionButton.isEnabled = false
urlField.leftView = permissionButton
urlField.leftViewMode = .unlessEditing
permissionLevelButton = permissionButton
permissionLevelButton?.heightAnchor.constraint(equalToConstant: CGFloat(URL_FIELD_HEIGHT)).isActive = true
permissionLevelButton?.widthAnchor.constraint(equalToConstant: CGFloat(URL_FIELD_HEIGHT)).isActive = true
permissionLevelButton?.imageView?.contentMode = .scaleAspectFit
urlField.leftView = permissionLevelButton
urlField.leftViewMode = .unlessEditing

urlField.clearButtonMode = .whileEditing
urlField.returnKeyType = .go
Expand Down

0 comments on commit c1e065b

Please sign in to comment.