From a872cf801c1137e1cc4dcd49c18435d1c5e7de27 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 25 May 2023 10:25:21 -0500 Subject: [PATCH] fixed orientation bug Signed-off-by: Matt Bruce --- VDS/Components/Tabs/Tabs.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/VDS/Components/Tabs/Tabs.swift b/VDS/Components/Tabs/Tabs.swift index a362ae4f..111b9347 100644 --- a/VDS/Components/Tabs/Tabs.swift +++ b/VDS/Components/Tabs/Tabs.swift @@ -52,12 +52,7 @@ open class Tabs: View { } } } - - public enum Width { - case percentage(CGFloat) - case value(CGFloat) - } - + //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- @@ -200,7 +195,7 @@ open class Tabs: View { if orientation == .horizontal && fillContainer { tabStackView.distribution = .fillEqually } else { - tabStackView.distribution = .fillProportionally + tabStackView.distribution = orientation == .horizontal ? .fillProportionally : .fill } tabStackView.axis = orientation == .horizontal ? .horizontal : .vertical @@ -217,6 +212,7 @@ open class Tabs: View { tabItem.orientation = orientation tabItem.surface = surface tabItem.indicatorPosition = indicatorPosition + tabItem.accessibilityLabel = "\(tabItem.text) \(tabItem.selected ? "selected" : "unselected") \(index+1) of \(tabItems.count)" } // Deactivate old constraint