Line style changes
This commit is contained in:
parent
e9569b0623
commit
50ef2ff6cc
@ -28,7 +28,6 @@ import Foundation
|
|||||||
(view: rightLabel, model: StackItemModel(horizontalAlignment: .fill))],
|
(view: rightLabel, model: StackItemModel(horizontalAlignment: .fill))],
|
||||||
axis: .horizontal)
|
axis: .horizontal)
|
||||||
bar.widthAnchor.constraint(equalToConstant: 20).isActive = true
|
bar.widthAnchor.constraint(equalToConstant: 20).isActive = true
|
||||||
|
|
||||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +41,8 @@ import Foundation
|
|||||||
|
|
||||||
override open func setupView() {
|
override open func setupView() {
|
||||||
super.setupView()
|
super.setupView()
|
||||||
rightLabel.setContentCompressionResistancePriority(UILayoutPriority(901), for: .horizontal)
|
rightLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
|
||||||
|
bar.setStyle(.heavy)
|
||||||
addMolecule(stack)
|
addMolecule(stack)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
open override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?{
|
open override class func estimatedHeight(with molecule: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?{
|
||||||
return 90
|
return 80
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func reset() {
|
open override func reset() {
|
||||||
|
|||||||
@ -18,6 +18,10 @@ public class ListRightVariableTotalDataModel: ListItemModel, MoleculeModelProtoc
|
|||||||
override public func setDefaults() {
|
override public func setDefaults() {
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
rightLabel.hero = 0
|
rightLabel.hero = 0
|
||||||
|
bar.type = .heavy
|
||||||
|
if bar.backgroundColor == nil {
|
||||||
|
bar.backgroundColor = Color(uiColor: .mvmBlue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public init (leftLabel: LabelModel, rightlabel:LabelModel, bar: LineModel){
|
public init (leftLabel: LabelModel, rightlabel:LabelModel, bar: LineModel){
|
||||||
@ -25,7 +29,6 @@ public class ListRightVariableTotalDataModel: ListItemModel, MoleculeModelProtoc
|
|||||||
self.rightLabel = rightlabel
|
self.rightLabel = rightlabel
|
||||||
self.bar = bar
|
self.bar = bar
|
||||||
super.init()
|
super.init()
|
||||||
setDefaults()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum CodingKeys: String, CodingKey{
|
private enum CodingKeys: String, CodingKey{
|
||||||
@ -35,6 +38,7 @@ public class ListRightVariableTotalDataModel: ListItemModel, MoleculeModelProtoc
|
|||||||
case bar
|
case bar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
|
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user