Commit 61144394 by Daniel Dahan

updated color naming

parent a6ae3833
...@@ -39,7 +39,7 @@ public extension MaterialTheme.view { ...@@ -39,7 +39,7 @@ public extension MaterialTheme.view {
public static let masksToBounds: Bool = false public static let masksToBounds: Bool = false
// color // color
public static let backgroudColor: UIColor = MaterialColor.white.color public static let backgroudColor: UIColor = MaterialColor.white
// interaction // interaction
public static let userInteractionEnabled: Bool = true public static let userInteractionEnabled: Bool = true
...@@ -67,7 +67,7 @@ public extension MaterialTheme.navigation { ...@@ -67,7 +67,7 @@ public extension MaterialTheme.navigation {
public static let masksToBounds: Bool = MaterialTheme.view.masksToBounds public static let masksToBounds: Bool = MaterialTheme.view.masksToBounds
// color // color
public static let backgroudColor: UIColor = MaterialColor.blue.accent2 public static let backgroudColor: UIColor = MaterialColor.blue.accent3
public static let lightContentStatusBar: Bool = true public static let lightContentStatusBar: Bool = true
// interaction // interaction
......
...@@ -30,20 +30,20 @@ public class MaterialView: UIView { ...@@ -30,20 +30,20 @@ public class MaterialView: UIView {
} }
/** /**
:name: contentsGravity :name: contentsRect
*/ */
public var contentsGravity: MaterialGravity! { public var contentsRect: CGRect! {
didSet { didSet {
layer.contentsGravity = MaterialGravityToString(contentsGravity) layer.contentsRect = contentsRect
} }
} }
/** /**
:name: contentsRect :name: contentsCenter
*/ */
public var contentsRect: CGRect! { public var contentsCenter: CGRect! {
didSet { didSet {
layer.contentsRect = contentsRect layer.contentsCenter = contentsCenter
} }
} }
...@@ -57,6 +57,15 @@ public class MaterialView: UIView { ...@@ -57,6 +57,15 @@ public class MaterialView: UIView {
} }
/** /**
:name: contentsGravity
*/
public var contentsGravity: MaterialGravity! {
didSet {
layer.contentsGravity = MaterialGravityToString(contentsGravity)
}
}
/**
:name: backgroundColor :name: backgroundColor
*/ */
public override var backgroundColor: UIColor? { public override var backgroundColor: UIColor? {
...@@ -198,9 +207,10 @@ public class MaterialView: UIView { ...@@ -198,9 +207,10 @@ public class MaterialView: UIView {
:name: prepareLayer :name: prepareLayer
*/ */
internal func prepareLayer() { internal func prepareLayer() {
contentsRect = MaterialTheme.view.contentsRect
contentsCenter = MaterialTheme.view.contentsCenter
contentsScale = MaterialTheme.view.contentsScale contentsScale = MaterialTheme.view.contentsScale
contentsGravity = MaterialTheme.view.contentsGravity contentsGravity = MaterialTheme.view.contentsGravity
contentsRect = MaterialTheme.view.contentsRect
shadowColor = MaterialTheme.view.shadowColor shadowColor = MaterialTheme.view.shadowColor
shadowOffset = MaterialTheme.view.shadowOffset shadowOffset = MaterialTheme.view.shadowOffset
shadowOpacity = MaterialTheme.view.shadowOpacity shadowOpacity = MaterialTheme.view.shadowOpacity
......
...@@ -51,9 +51,10 @@ public class NavigationBarView: MaterialView { ...@@ -51,9 +51,10 @@ public class NavigationBarView: MaterialView {
:name: prepareLayer :name: prepareLayer
*/ */
internal override func prepareLayer() { internal override func prepareLayer() {
contentsRect = MaterialTheme.navigation.contentsRect
contentsCenter = MaterialTheme.navigation.contentsCenter
contentsScale = MaterialTheme.navigation.contentsScale contentsScale = MaterialTheme.navigation.contentsScale
contentsGravity = MaterialTheme.navigation.contentsGravity contentsGravity = MaterialTheme.navigation.contentsGravity
contentsRect = MaterialTheme.navigation.contentsRect
shadowColor = MaterialTheme.navigation.shadowColor shadowColor = MaterialTheme.navigation.shadowColor
shadowOffset = MaterialTheme.navigation.shadowOffset shadowOffset = MaterialTheme.navigation.shadowOffset
shadowOpacity = MaterialTheme.navigation.shadowOpacity shadowOpacity = MaterialTheme.navigation.shadowOpacity
......
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