Commit 3c9a67d4 by Daniel Dahan

added shadow depth

parent 507affe6
......@@ -38,7 +38,7 @@ public class FlatButton : MaterialButton {
//
internal override func prepareLayer() {
super.prepareLayer()
shadow = MaterialTheme.button.flat.shadow
shadowDepth = MaterialTheme.button.flat.shadowDepth
shadowColor = MaterialTheme.button.flat.shadowColor
zPosition = MaterialTheme.button.flat.zPosition
masksToBounds = MaterialTheme.button.flat.masksToBounds
......
......@@ -145,11 +145,11 @@ public class MaterialButton : UIButton {
}
/**
:name: shadow
:name: shadowDepth
*/
public var shadow: MaterialShadow! {
public var shadowDepth: MaterialShadow! {
didSet {
let value: MaterialShadowType = MaterialShadowToValue(shadow)
let value: MaterialShadowType = MaterialShadowToValue(shadowDepth)
shadowOffset = value.offset
shadowOpacity = value.opacity
shadowRadius = value.radius
......
......@@ -37,7 +37,7 @@ public extension MaterialTheme.view {
public static let height: CGFloat = UIScreen.mainScreen().bounds.height
// shadow
public static let shadow: MaterialShadow = .Depth0
public static let shadowDepth: MaterialShadow = .Depth0
public static let shadowColor: UIColor = MaterialColor.blueGrey.darken4
// shape
......@@ -73,7 +73,7 @@ public extension MaterialTheme.navigation {
public static let height: CGFloat = 70
// shadow
public static let shadow: MaterialShadow = .Depth1
public static let shadowDepth: MaterialShadow = .Depth1
public static let shadowColor: UIColor = MaterialTheme.view.shadowColor
// shape
......@@ -104,7 +104,7 @@ public extension MaterialTheme.navigation {
// button
public extension MaterialTheme.button {
// shadow
public static let shadow: MaterialShadow = .Depth0
public static let shadowDepth: MaterialShadow = .Depth0
public static let shadowColor: UIColor = MaterialTheme.view.shadowColor
// shape
......@@ -133,7 +133,7 @@ public extension MaterialTheme.button {
// button.flat
public extension MaterialTheme.button.flat {
// shadow
public static let shadow: MaterialShadow = MaterialTheme.button.shadow
public static let shadowDepth: MaterialShadow = MaterialTheme.button.shadowDepth
public static let shadowColor: UIColor = MaterialTheme.button.shadowColor
// shape
......
......@@ -190,11 +190,11 @@ public class MaterialView: UIView {
}
/**
:name: shadow
:name: shadowDepth
*/
public var shadow: MaterialShadow! {
public var shadowDepth: MaterialShadow! {
didSet {
let value: MaterialShadowType = MaterialShadowToValue(shadow)
let value: MaterialShadowType = MaterialShadowToValue(shadowDepth)
shadowOffset = value.offset
shadowOpacity = value.opacity
shadowRadius = value.radius
......@@ -260,7 +260,7 @@ public class MaterialView: UIView {
contentsCenter = MaterialTheme.view.contentsCenter
contentsScale = MaterialTheme.view.contentsScale
contentsGravity = MaterialTheme.view.contentsGravity
shadow = MaterialTheme.view.shadow
shadowDepth = MaterialTheme.view.shadowDepth
shadowColor = MaterialTheme.view.shadowColor
zPosition = MaterialTheme.view.zPosition
masksToBounds = MaterialTheme.view.masksToBounds
......
......@@ -54,7 +54,7 @@ public class NavigationBarView: MaterialView {
contentsCenter = MaterialTheme.navigation.contentsCenter
contentsScale = MaterialTheme.navigation.contentsScale
contentsGravity = MaterialTheme.navigation.contentsGravity
shadow = MaterialTheme.navigation.shadow
shadowDepth = MaterialTheme.navigation.shadowDepth
shadowColor = MaterialTheme.navigation.shadowColor
zPosition = MaterialTheme.navigation.zPosition
masksToBounds = MaterialTheme.navigation.masksToBounds
......
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