Showing
1 changed file
with
8 additions
and
4 deletions
| ... | @@ -90,7 +90,7 @@ import SwiftEventBus | ... | @@ -90,7 +90,7 @@ import SwiftEventBus |
| 90 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) | 90 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) |
| 91 | questionnaireButton.setTitleColor(.white, for: .normal) | 91 | questionnaireButton.setTitleColor(.white, for: .normal) |
| 92 | // questionnaireButton.sizeToFit() | 92 | // questionnaireButton.sizeToFit() |
| 93 | - questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: questionnaireButton.intrinsicContentSize.height) | 93 | + questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26) |
| 94 | questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0) | 94 | questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0) |
| 95 | // Shadow Color | 95 | // Shadow Color |
| 96 | questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor | 96 | questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor |
| ... | @@ -98,12 +98,14 @@ import SwiftEventBus | ... | @@ -98,12 +98,14 @@ import SwiftEventBus |
| 98 | questionnaireButton.layer.shadowOpacity = 1.0 | 98 | questionnaireButton.layer.shadowOpacity = 1.0 |
| 99 | questionnaireButton.layer.shadowRadius = 0.0 | 99 | questionnaireButton.layer.shadowRadius = 0.0 |
| 100 | questionnaireButton.layer.masksToBounds = false | 100 | questionnaireButton.layer.masksToBounds = false |
| 101 | + questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 8, left: 10, bottom: 2, right: 10) | ||
| 101 | } else { | 102 | } else { |
| 102 | questionnaireButton.setTitle("+Προτιμήσεις", for: .normal) | 103 | questionnaireButton.setTitle("+Προτιμήσεις", for: .normal) |
| 103 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) | 104 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) |
| 104 | questionnaireButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) | 105 | questionnaireButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) |
| 105 | questionnaireButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) | 106 | questionnaireButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) |
| 106 | - questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: questionnaireButton.intrinsicContentSize.height) | 107 | + questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26) |
| 108 | + questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10) | ||
| 107 | } | 109 | } |
| 108 | 110 | ||
| 109 | questionnaireButton.layer.cornerRadius = 7.0 | 111 | questionnaireButton.layer.cornerRadius = 7.0 |
| ... | @@ -293,7 +295,7 @@ import SwiftEventBus | ... | @@ -293,7 +295,7 @@ import SwiftEventBus |
| 293 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) | 295 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) |
| 294 | questionnaireButton.setTitleColor(.white, for: .normal) | 296 | questionnaireButton.setTitleColor(.white, for: .normal) |
| 295 | // questionnaireButton.sizeToFit() | 297 | // questionnaireButton.sizeToFit() |
| 296 | - questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: questionnaireButton.intrinsicContentSize.height) | 298 | + questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26) |
| 297 | questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0) | 299 | questionnaireButton.applyGradient(colours: [UIColor(red: 0.40, green: 0.77, blue: 0.28, alpha: 1.00), UIColor(red: 0.10, green: 0.66, blue: 0.72, alpha: 1.00)], gradient: GradientOrientation.horizontal, cornerRadius: 7.0) |
| 298 | // Shadow Color | 300 | // Shadow Color |
| 299 | questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor | 301 | questionnaireButton.layer.shadowColor = UIColor(red: 0.33, green: 0.38, blue: 0.43, alpha: 1.00).cgColor |
| ... | @@ -301,6 +303,7 @@ import SwiftEventBus | ... | @@ -301,6 +303,7 @@ import SwiftEventBus |
| 301 | questionnaireButton.layer.shadowOpacity = 1.0 | 303 | questionnaireButton.layer.shadowOpacity = 1.0 |
| 302 | questionnaireButton.layer.shadowRadius = 0.0 | 304 | questionnaireButton.layer.shadowRadius = 0.0 |
| 303 | questionnaireButton.layer.masksToBounds = false | 305 | questionnaireButton.layer.masksToBounds = false |
| 306 | + questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 8, left: 10, bottom: 2, right: 10) | ||
| 304 | } else { | 307 | } else { |
| 305 | for layer in (questionnaireButton.layer.sublayers ?? []) { | 308 | for layer in (questionnaireButton.layer.sublayers ?? []) { |
| 306 | if(layer.name == "linearGradientLayer"){ | 309 | if(layer.name == "linearGradientLayer"){ |
| ... | @@ -312,7 +315,8 @@ import SwiftEventBus | ... | @@ -312,7 +315,8 @@ import SwiftEventBus |
| 312 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) | 315 | questionnaireButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 14) |
| 313 | questionnaireButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) | 316 | questionnaireButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal) |
| 314 | questionnaireButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) | 317 | questionnaireButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00) |
| 315 | - questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: questionnaireButton.intrinsicContentSize.height) | 318 | + questionnaireButton.frame = CGRect(x: 0.0, y: 0.0, width: questionnaireButton.intrinsicContentSize.width, height: 26) |
| 319 | + questionnaireButton.contentEdgeInsets = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10) | ||
| 316 | } | 320 | } |
| 317 | questionnaireButton.layer.cornerRadius = 7.0 | 321 | questionnaireButton.layer.cornerRadius = 7.0 |
| 318 | } | 322 | } | ... | ... |
-
Please register or login to post a comment