Various fixes

This commit is contained in:
Ilya Laktyushin
2025-08-21 16:01:12 +04:00
parent ed2b41a1a1
commit 8abcfbd895
2 changed files with 5 additions and 7 deletions

View File

@@ -632,7 +632,7 @@ public final class TabSelectorComponent: Component {
}
let estimatedContentWidth = 2.0 * spacing + innerContentWidth + (CGFloat(component.items.count - 1) * (spacing + innerInset))
if component.customLayout?.fillWidth == true && estimatedContentWidth < availableSize.width {
if component.customLayout?.fillWidth == true && estimatedContentWidth < availableSize.width && component.items.count > 1 {
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1) - innerInset * 2.0
} else if estimatedContentWidth > availableSize.width && !allowScroll {
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1)