Skip to content

Commit

Permalink
Fix bug related to stack layout within scroll views
Browse files Browse the repository at this point in the history
  • Loading branch information
aabewhite committed Aug 23, 2024
1 parent b2235b0 commit c89e7f3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Sources/SkipUI/SkipUI/Compose/ComposeContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ import androidx.compose.ui.Modifier
var modifier = modifier
let inheritedScrollAxes = EnvironmentValues.shared._scrollAxes
var totalScrollAxes = inheritedScrollAxes
if fixedWidth {
if fixedWidth || axis == .vertical {
totalScrollAxes.remove(Axis.Set.horizontal)
} else if isFillWidth.value {
}
if !fixedWidth && isFillWidth.value {
if fillWidth {
modifier = modifier.fillWidth()
} else if inheritedScrollAxes.contains(Axis.Set.horizontal) {
Expand All @@ -56,9 +57,10 @@ import androidx.compose.ui.Modifier
modifier = modifier.fillWidth()
}
}
if fixedHeight {
if fixedHeight || axis == .horizontal {
totalScrollAxes.remove(Axis.Set.vertical)
} else if isFillHeight.value {
}
if !fixedHeight && isFillHeight.value {
if fillHeight {
modifier = modifier.fillHeight()
} else if inheritedScrollAxes.contains(Axis.Set.vertical) {
Expand Down

0 comments on commit c89e7f3

Please sign in to comment.