<commit_before>//
//  OutlineLabel.swift
//  Pods
//
//  Created by <NAME> on 16/6/8.
//
//

import UIKit
import BXiOSUtils

open class OutlineLabel:PaddingLabel{
  
  open var borderColor:UIColor = UIColor(hex: 0xe0e0e0){
    didSet{
      layer.borderColor = borderColor.cgColor
    }
  }

  open var outlineStyle:CornerStyle = .radius(4){
    didSet{
      updateCornerRadius()
    }
  }
  
  open var borderWidth:CGFloat = .onePixel{
    didSet{
      layer.borderWidth = borderWidth
    }
  }
  
  
  open override func layoutSubviews() {
    super.layoutSubviews()
    updateCornerRadius()
    layer.borderWidth = borderWidth
    layer.borderColor = borderColor.cgColor
    clipsToBounds = true
  }

  func updateCornerRadius(){
    switch outlineStyle {
    case .oval:
      layer.cornerRadius = min(bounds.width, bounds.height) * 0.5
    case .semiCircle:
      layer.cornerRadius = bounds.height * 0.5
    case .radius(let rd):
      layer.cornerRadius = rd
    case .none:
      layer.cornerRadius = 0
    }
  }<commit_msg>fix outlineLabel borderWidth onePixel -> 1.5 Point<commit_after>//
//  OutlineLabel.swift
//  Pods
//
//  Created by <NAME> on 16/6/8.
//
//

import UIKit
import BXiOSUtils

open class OutlineLabel:PaddingLabel{
  
  open var borderColor:UIColor = UIColor(hex: 0xe0e0e0){
    didSet{
      layer.borderColor = borderColor.cgColor
    }
  }

  open var outlineStyle:CornerStyle = .radius(4){
    didSet{
      updateCornerRadius()
    }
  }
  
  open var borderWidth:CGFloat = 1.5{
    didSet{
      layer.borderWidth = borderWidth
    }
  }
  
  
  open override func layoutSubviews() {
    super.layoutSubviews()
    updateCornerRadius()
    layer.borderWidth = borderWidth
    layer.borderColor = borderColor.cgColor
    clipsToBounds = true
  }

  func updateCornerRadius(){
    switch outlineStyle {
    case .oval:
      layer.cornerRadius = min(bounds.width, bounds.height) * 0.5
    case .semiCircle:
      layer.cornerRadius = bounds.height * 0.5
    case .radius(let rd):
      layer.cornerRadius = rd
    case .none:
      layer.cornerRadius = 0
    }
  }
{'fraction_non_alphanumeric': 0.10242972844211529, 'fraction_numerical': 0.015245354930919485, 'mean_word_length': 2.553299492385787, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4014552', 'n_tokens_mistral': 736, 'n_tokens_neox': 704, 'n_words': 149}