Commit baf5f068 by Daniel Dahan

updated Material Card alignment interface

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