Commit 2416672f by Daniel Dahan

issue-7: updated button insets

parent 2e6af65c
...@@ -41,6 +41,7 @@ public class BasicCard : MaterialCard { ...@@ -41,6 +41,7 @@ public class BasicCard : MaterialCard {
public var titleLabel: UILabel? { public var titleLabel: UILabel? {
didSet { didSet {
titleLabel!.setTranslatesAutoresizingMaskIntoConstraints(false) titleLabel!.setTranslatesAutoresizingMaskIntoConstraints(false)
titleLabel!.textColor = MaterialTheme.white.color
titleLabel!.font = Roboto.regularWithSize(22.0) titleLabel!.font = Roboto.regularWithSize(22.0)
addSubview(titleLabel!) addSubview(titleLabel!)
prepareCard() prepareCard()
...@@ -53,6 +54,7 @@ public class BasicCard : MaterialCard { ...@@ -53,6 +54,7 @@ public class BasicCard : MaterialCard {
public var detailTextLabel: UILabel? { public var detailTextLabel: UILabel? {
didSet { didSet {
detailTextLabel!.setTranslatesAutoresizingMaskIntoConstraints(false) detailTextLabel!.setTranslatesAutoresizingMaskIntoConstraints(false)
detailTextLabel!.textColor = MaterialTheme.white.color
detailTextLabel!.font = Roboto.lightWithSize(16.0) detailTextLabel!.font = Roboto.lightWithSize(16.0)
detailTextLabel!.numberOfLines = 0 detailTextLabel!.numberOfLines = 0
detailTextLabel!.lineBreakMode = .ByWordWrapping detailTextLabel!.lineBreakMode = .ByWordWrapping
...@@ -109,7 +111,6 @@ public class BasicCard : MaterialCard { ...@@ -109,7 +111,6 @@ public class BasicCard : MaterialCard {
horizontalFormat += "-(20)-[button\(i)]" horizontalFormat += "-(20)-[button\(i)]"
verticalFormat += "-(20)-[button\(i)]" verticalFormat += "-(20)-[button\(i)]"
} }
horizontalFormat += "-(20)-|"
layoutConstraints += Layout.constraint(horizontalFormat, options: nil, metrics: nil, views: buttonViews) layoutConstraints += Layout.constraint(horizontalFormat, options: nil, metrics: nil, views: buttonViews)
} }
......
...@@ -27,6 +27,7 @@ public class FlatButton : MaterialButton { ...@@ -27,6 +27,7 @@ public class FlatButton : MaterialButton {
setTitleColor(MaterialTheme.indigo.darken1, forState: .Normal) setTitleColor(MaterialTheme.indigo.darken1, forState: .Normal)
pulseColor = MaterialTheme.indigo.darken1 pulseColor = MaterialTheme.indigo.darken1
backgroundColor = MaterialTheme.clear.color backgroundColor = MaterialTheme.clear.color
contentEdgeInsets = UIEdgeInsetsMake(10, 20, 10, 20)
} }
// //
......
...@@ -26,6 +26,7 @@ public class RaisedButton : MaterialButton { ...@@ -26,6 +26,7 @@ public class RaisedButton : MaterialButton {
super.prepareView() super.prepareView()
setTitleColor(MaterialTheme.white.color, forState: .Normal) setTitleColor(MaterialTheme.white.color, forState: .Normal)
backgroundColor = MaterialTheme.indigo.darken1 backgroundColor = MaterialTheme.indigo.darken1
contentEdgeInsets = UIEdgeInsetsMake(10, 20, 10, 20)
} }
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment