Skip to content

Commit

Permalink
Fixed first part of the split pane being shown a tiny bit during reba…
Browse files Browse the repository at this point in the history
…se interactive
  • Loading branch information
JetpackDuba committed Mar 20, 2024
1 parent 49c1d7e commit 78156a6
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerHoverIcon
import androidx.compose.ui.unit.dp
Expand All @@ -27,23 +27,24 @@ fun TripleVerticalSplitPanel(
Row(
modifier = modifier
) {
Box(modifier = Modifier.width(firstWidth.dp)) {
first()
if (firstWidth > 0) {
Box(modifier = Modifier.width(firstWidth.dp)) {
first()
}
Box(
modifier = Modifier
.fillMaxHeight()
.width(8.dp)
.draggable(
state = rememberDraggableState {
onFirstSizeDrag(it)
},
orientation = Orientation.Horizontal
)
.pointerHoverIcon(resizePointerIconEast)
)
}

Box(
modifier = Modifier
.fillMaxHeight()
.width(8.dp)
.draggable(
state = rememberDraggableState {
onFirstSizeDrag(it)
},
orientation = Orientation.Horizontal
)
.pointerHoverIcon(resizePointerIconEast)
)

Box(Modifier.weight(1f, true)) {
second()
}
Expand Down

0 comments on commit 78156a6

Please sign in to comment.