Commit baf5f068 by Daniel Dahan

updated Material Card alignment interface

parent 5e2c7c1f
...@@ -357,8 +357,7 @@ public class BasicCardView : MaterialCardView, Comparable, Equatable { ...@@ -357,8 +357,7 @@ public class BasicCardView : MaterialCardView, Comparable, Equatable {
// common text // common text
Layout.height(titleLabelContainer!, child: titleLabel!, height: 1.5 * titleLabel!.font.pointSize) Layout.height(titleLabelContainer!, child: titleLabel!, height: 1.5 * titleLabel!.font.pointSize)
Layout.expandToParentVerticallyWithPad(titleLabelContainer!, child: titleLabel!, top: titleLabelTopInset, bottom: titleLabelBottomInset) Layout.expandToParentWithPad(titleLabelContainer!, child: titleLabel!, top: titleLabelTopInset, left: titleLabelLeftInset, bottom: titleLabelBottomInset, right: titleLabelRightInset)
Layout.expandToParentHorizontallyWithPad(titleLabelContainer!, child: titleLabel!, left: titleLabelLeftInset, right: titleLabelRightInset)
} }
// detail // detail
......
...@@ -74,17 +74,11 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable { ...@@ -74,17 +74,11 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
*/ */
public var titleLabelVerticalInset: CGFloat = MaterialTheme.verticalInset { public var titleLabelVerticalInset: CGFloat = MaterialTheme.verticalInset {
didSet { didSet {
titleLabelTopInset = titleLabelVerticalInset
titleLabelBottomInset = titleLabelVerticalInset titleLabelBottomInset = titleLabelVerticalInset
} }
} }
/** /**
:name: titleLabelTopInset
*/
public var titleLabelTopInset: CGFloat = MaterialTheme.verticalInset
/**
:name: titleLabelBottomInset :name: titleLabelBottomInset
*/ */
public var titleLabelBottomInset: CGFloat = MaterialTheme.verticalInset public var titleLabelBottomInset: CGFloat = MaterialTheme.verticalInset
...@@ -469,8 +463,7 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable { ...@@ -469,8 +463,7 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
// common text // common text
Layout.height(titleLabelContainer!, child: titleLabel!, height: 1.5 * titleLabel!.font.pointSize) Layout.height(titleLabelContainer!, child: titleLabel!, height: 1.5 * titleLabel!.font.pointSize)
Layout.expandToParentVerticallyWithPad(titleLabelContainer!, child: titleLabel!, top: titleLabelTopInset, bottom: titleLabelBottomInset) Layout.expandToParentWithPad(titleLabelContainer!, child: titleLabel!, left: titleLabelLeftInset, bottom: titleLabelBottomInset, right: titleLabelRightInset)
Layout.expandToParentHorizontallyWithPad(titleLabelContainer!, child: titleLabel!, left: titleLabelLeftInset, right: titleLabelRightInset)
} }
// detail // detail
......
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