CXTDT-423141 - Tabs - Incorrect spacing on top-aligned Fill container
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
a9b39c0fbf
commit
8c6fcee828
@ -47,17 +47,6 @@ open class Tabs: View {
|
|||||||
public enum Size: String, CaseIterable {
|
public enum Size: String, CaseIterable {
|
||||||
case medium
|
case medium
|
||||||
case large
|
case large
|
||||||
|
|
||||||
public var textStyle: TextStyle {
|
|
||||||
if self == .medium {
|
|
||||||
return .boldBodyLarge
|
|
||||||
} else {
|
|
||||||
//specs show that the font size shouldn't change however boldTitleSmall does
|
|
||||||
//change point size between iPad/iPhone. This is a "fix" so each device will
|
|
||||||
//load the correct pointSize
|
|
||||||
return UIDevice.isIPad ? .boldTitleSmall : .boldTitleMedium
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -220,6 +209,7 @@ open class Tabs: View {
|
|||||||
// Create new tab items from the models
|
// Create new tab items from the models
|
||||||
for model in models {
|
for model in models {
|
||||||
let tabItem = Tab()
|
let tabItem = Tab()
|
||||||
|
tabItem.size = size
|
||||||
tabItem.text = model.text
|
tabItem.text = model.text
|
||||||
tabItem.onClick = model.onClick
|
tabItem.onClick = model.onClick
|
||||||
tabItem.width = model.width
|
tabItem.width = model.width
|
||||||
@ -258,10 +248,10 @@ open class Tabs: View {
|
|||||||
|
|
||||||
// Update tab appearance based on properties
|
// Update tab appearance based on properties
|
||||||
for (index, tabItem) in tabViews.enumerated() {
|
for (index, tabItem) in tabViews.enumerated() {
|
||||||
|
tabItem.size = size
|
||||||
tabItem.selected = selectedIndex == index
|
tabItem.selected = selectedIndex == index
|
||||||
tabItem.index = index
|
tabItem.index = index
|
||||||
tabItem.minWidth = minWidth
|
tabItem.minWidth = minWidth
|
||||||
tabItem.size = size
|
|
||||||
tabItem.textPosition = textPosition
|
tabItem.textPosition = textPosition
|
||||||
tabItem.orientation = orientation
|
tabItem.orientation = orientation
|
||||||
tabItem.surface = surface
|
tabItem.surface = surface
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user