navigation line dark fix
This commit is contained in:
parent
012d677b0f
commit
32d3a20232
@ -23,10 +23,21 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
|
|
||||||
open var title: String?
|
open var title: String?
|
||||||
open var hidden: Bool?
|
open var hidden: Bool?
|
||||||
open var line: LineModel?
|
|
||||||
open var hidesSystemBackButton: Bool?
|
open var hidesSystemBackButton: Bool?
|
||||||
open var style: NavigationItemStyle?
|
open var style: NavigationItemStyle?
|
||||||
|
|
||||||
|
open var _line: LineModel?
|
||||||
|
open var line: LineModel? {
|
||||||
|
get {
|
||||||
|
let line = _line ?? LineModel(type: .secondary)
|
||||||
|
line.inverted = style == .dark
|
||||||
|
return line
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
_line = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
open var _backgroundColor: Color?
|
open var _backgroundColor: Color?
|
||||||
open var backgroundColor: Color? {
|
open var backgroundColor: Color? {
|
||||||
get {
|
get {
|
||||||
@ -100,7 +111,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
hidden = try typeContainer.decodeIfPresent(Bool.self, forKey: .hidden)
|
hidden = try typeContainer.decodeIfPresent(Bool.self, forKey: .hidden)
|
||||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
_tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor)
|
_tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor)
|
||||||
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
_line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
||||||
hidesSystemBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .hidesSystemBackButton)
|
hidesSystemBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .hidesSystemBackButton)
|
||||||
alwaysShowBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowBackButton)
|
alwaysShowBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowBackButton)
|
||||||
backButton = try typeContainer.decodeModelIfPresent(codingKey: .backButton)
|
backButton = try typeContainer.decodeModelIfPresent(codingKey: .backButton)
|
||||||
@ -119,7 +130,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
try container.encodeIfPresent(hidden, forKey: .hidden)
|
try container.encodeIfPresent(hidden, forKey: .hidden)
|
||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
try container.encodeIfPresent(_tintColor, forKey: .tintColor)
|
try container.encodeIfPresent(_tintColor, forKey: .tintColor)
|
||||||
try container.encodeIfPresent(line, forKey: .line)
|
try container.encodeIfPresent(_line, forKey: .line)
|
||||||
try container.encodeIfPresent(hidesSystemBackButton, forKey: .hidesSystemBackButton)
|
try container.encodeIfPresent(hidesSystemBackButton, forKey: .hidesSystemBackButton)
|
||||||
try container.encodeIfPresent(alwaysShowBackButton, forKey: .alwaysShowBackButton)
|
try container.encodeIfPresent(alwaysShowBackButton, forKey: .alwaysShowBackButton)
|
||||||
try container.encodeModelIfPresent(backButton, forKey: .backButton)
|
try container.encodeModelIfPresent(backButton, forKey: .backButton)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user