Merge branch 'mbruce/bugfixes' into 'develop'
ONEAPP-5109 - Typography/Label - Accessibility iOS See merge request BPHV_MIPS/vds_ios!115
This commit is contained in:
commit
6b81fc027f
@ -227,6 +227,11 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
|||||||
|
|
||||||
open func updateAccessibility() {
|
open func updateAccessibility() {
|
||||||
accessibilityLabel = text
|
accessibilityLabel = text
|
||||||
|
if isEnabled {
|
||||||
|
accessibilityTraits.remove(.notEnabled)
|
||||||
|
} else {
|
||||||
|
accessibilityTraits.insert(.notEnabled)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -41,12 +41,6 @@ open class Line: View {
|
|||||||
case horizontal, vertical
|
case horizontal, vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Configuration
|
|
||||||
//--------------------------------------------------
|
|
||||||
/// Width of the line.
|
|
||||||
public let lineWidth: CGFloat = 1.0
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -55,19 +49,25 @@ open class Line: View {
|
|||||||
|
|
||||||
/// Allows to render the line vertically.
|
/// Allows to render the line vertically.
|
||||||
open var orientation: Orientation = .horizontal { didSet { setNeedsUpdate() } }
|
open var orientation: Orientation = .horizontal { didSet { setNeedsUpdate() } }
|
||||||
|
|
||||||
/// The natural size for the receiving view, considering only properties of the view itself.
|
/// The natural size for the receiving view, considering only properties of the view itself.
|
||||||
open override var intrinsicContentSize: CGSize {
|
open override var intrinsicContentSize: CGSize {
|
||||||
if orientation == .vertical {
|
if orientation == .vertical {
|
||||||
return .init(width: 1, height: bounds.height)
|
return .init(width: lineWidth, height: bounds.height)
|
||||||
} else {
|
} else {
|
||||||
return .init(width: bounds.width, height: 1)
|
return .init(width: bounds.width, height: lineWidth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Configuration
|
// MARK: - Configuration
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
/// Width of the line.
|
||||||
|
public let lineWidth: CGFloat = 1.0
|
||||||
|
|
||||||
|
/// Line Color for current Style and Surface.
|
||||||
|
open var lineColor: UIColor { lineViewColorConfiguration.getColor(self) }
|
||||||
|
|
||||||
/// Color configuration use for text color. This is a configuration that will provide a color based
|
/// Color configuration use for text color. This is a configuration that will provide a color based
|
||||||
/// of local properties such as style and surface.
|
/// of local properties such as style and surface.
|
||||||
open var lineViewColorConfiguration: AnyColorable = {
|
open var lineViewColorConfiguration: AnyColorable = {
|
||||||
@ -76,7 +76,7 @@ open class Line: View {
|
|||||||
config.setSurfaceColors(VDSColor.elementsLowcontrastOnlight, VDSColor.elementsLowcontrastOndark, forKey: .secondary)
|
config.setSurfaceColors(VDSColor.elementsLowcontrastOnlight, VDSColor.elementsLowcontrastOndark, forKey: .secondary)
|
||||||
return config.eraseToAnyColorable()
|
return config.eraseToAnyColorable()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Overrides
|
// MARK: - Overrides
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -102,7 +102,7 @@ open class Line: View {
|
|||||||
open override func draw(_ rect: CGRect) {
|
open override func draw(_ rect: CGRect) {
|
||||||
guard let context = UIGraphicsGetCurrentContext() else { return }
|
guard let context = UIGraphicsGetCurrentContext() else { return }
|
||||||
|
|
||||||
context.setStrokeColor(lineViewColorConfiguration.getColor(self).cgColor)
|
context.setStrokeColor(lineColor.cgColor)
|
||||||
context.setLineWidth(lineWidth)
|
context.setLineWidth(lineWidth)
|
||||||
|
|
||||||
if orientation == .horizontal {
|
if orientation == .horizontal {
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
1.0.44
|
||||||
|
=======
|
||||||
|
- ONEAPP-5109 - Typography/Label - Accessibility iOS
|
||||||
|
|
||||||
1.0.43
|
1.0.43
|
||||||
=======
|
=======
|
||||||
- CXTDT-464973 - Button - Width percentage parameter missing.
|
- CXTDT-464973 - Button - Width percentage parameter missing.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user