Nikolay Igotti
4 years ago
18 changed files with 333 additions and 329 deletions
@ -1,3 +1,3 @@ |
|||||||
# __LATEST_COMPOSE_RELEASE_VERSION__ |
# __LATEST_COMPOSE_RELEASE_VERSION__ |
||||||
compose.version=0.3.0 |
compose.version=0.3.1 |
||||||
kotlin.code.style=official |
kotlin.code.style=official |
||||||
|
@ -1,116 +1,116 @@ |
|||||||
package org.jetbrains.compose.splitpane |
package org.jetbrains.compose.splitpane |
||||||
|
|
||||||
import androidx.compose.runtime.Composable |
import androidx.compose.runtime.Composable |
||||||
import androidx.compose.ui.Modifier |
import androidx.compose.ui.Modifier |
||||||
import androidx.compose.ui.unit.Dp |
import androidx.compose.ui.unit.Dp |
||||||
import androidx.compose.ui.unit.dp |
import androidx.compose.ui.unit.dp |
||||||
|
|
||||||
internal data class MinimalSizes( |
internal data class MinimalSizes( |
||||||
val firstPlaceableMinimalSize: Dp, |
val firstPlaceableMinimalSize: Dp, |
||||||
val secondPlaceableMinimalSize: Dp |
val secondPlaceableMinimalSize: Dp |
||||||
) |
) |
||||||
|
|
||||||
/** |
/** |
||||||
* Pane that place it parts **vertically** from top to bottom and allows to change items **heights**. |
* Pane that place it parts **vertically** from top to bottom and allows to change items **heights**. |
||||||
* The [content] block defines DSL which allow you to configure top ([SplitPaneScope.first]), |
* The [content] block defines DSL which allow you to configure top ([SplitPaneScope.first]), |
||||||
* bottom ([SplitPaneScope.second]). |
* bottom ([SplitPaneScope.second]). |
||||||
* |
* |
||||||
* @param modifier the modifier to apply to this layout |
* @param modifier the modifier to apply to this layout |
||||||
* @param splitPaneState the state object to be used to control or observe the split pane state |
* @param splitPaneState the state object to be used to control or observe the split pane state |
||||||
* @param content a block which describes the content. Inside this block you can use methods like |
* @param content a block which describes the content. Inside this block you can use methods like |
||||||
* [SplitPaneScope.first], [SplitPaneScope.second], to describe parts of split pane. |
* [SplitPaneScope.first], [SplitPaneScope.second], to describe parts of split pane. |
||||||
*/ |
*/ |
||||||
@ExperimentalSplitPaneApi |
@ExperimentalSplitPaneApi |
||||||
@Composable |
@Composable |
||||||
fun VerticalSplitPane( |
fun VerticalSplitPane( |
||||||
modifier: Modifier = Modifier, |
modifier: Modifier = Modifier, |
||||||
splitPaneState: SplitPaneState = rememberSplitPaneState(), |
splitPaneState: SplitPaneState = rememberSplitPaneState(), |
||||||
content: SplitPaneScope.() -> Unit |
content: SplitPaneScope.() -> Unit |
||||||
) { |
) { |
||||||
with(SplitPaneScopeImpl(isHorizontal = false, splitPaneState).apply(content)) { |
with(SplitPaneScopeImpl(isHorizontal = false, splitPaneState).apply(content)) { |
||||||
if (firstPlaceableContent != null && secondPlaceableContent != null) { |
if (firstPlaceableContent != null && secondPlaceableContent != null) { |
||||||
SplitPane( |
SplitPane( |
||||||
modifier = modifier, |
modifier = modifier, |
||||||
isHorizontal = false, |
isHorizontal = false, |
||||||
splitPaneState = splitPaneState, |
splitPaneState = splitPaneState, |
||||||
minimalSizesConfiguration = minimalSizes, |
minimalSizesConfiguration = minimalSizes, |
||||||
first = firstPlaceableContent!!, |
first = firstPlaceableContent!!, |
||||||
second = secondPlaceableContent!!, |
second = secondPlaceableContent!!, |
||||||
splitter = splitter |
splitter = splitter |
||||||
) |
) |
||||||
} else { |
} else { |
||||||
firstPlaceableContent?.invoke() |
firstPlaceableContent?.invoke() |
||||||
secondPlaceableContent?.invoke() |
secondPlaceableContent?.invoke() |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
/** |
/** |
||||||
* Pane that place it parts **horizontally** from left to right and allows to change items **width**. |
* Pane that place it parts **horizontally** from left to right and allows to change items **width**. |
||||||
* The [content] block defines DSL which allow you to configure left ([SplitPaneScope.first]), |
* The [content] block defines DSL which allow you to configure left ([SplitPaneScope.first]), |
||||||
* right ([SplitPaneScope.second]) parts of split pane. |
* right ([SplitPaneScope.second]) parts of split pane. |
||||||
* |
* |
||||||
* @param modifier the modifier to apply to this layout |
* @param modifier the modifier to apply to this layout |
||||||
* @param splitPaneState the state object to be used to control or observe the split pane state |
* @param splitPaneState the state object to be used to control or observe the split pane state |
||||||
* @param content a block which describes the content. Inside this block you can use methods like |
* @param content a block which describes the content. Inside this block you can use methods like |
||||||
* [SplitPaneScope.first], [SplitPaneScope.second], to describe parts of split pane. |
* [SplitPaneScope.first], [SplitPaneScope.second], to describe parts of split pane. |
||||||
*/ |
*/ |
||||||
@ExperimentalSplitPaneApi |
@ExperimentalSplitPaneApi |
||||||
@Composable |
@Composable |
||||||
fun HorizontalSplitPane( |
fun HorizontalSplitPane( |
||||||
modifier: Modifier = Modifier, |
modifier: Modifier = Modifier, |
||||||
splitPaneState: SplitPaneState = rememberSplitPaneState(), |
splitPaneState: SplitPaneState = rememberSplitPaneState(), |
||||||
content: SplitPaneScope.() -> Unit |
content: SplitPaneScope.() -> Unit |
||||||
) { |
) { |
||||||
with(SplitPaneScopeImpl(isHorizontal = true, splitPaneState).apply(content)) { |
with(SplitPaneScopeImpl(isHorizontal = true, splitPaneState).apply(content)) { |
||||||
if (firstPlaceableContent != null && secondPlaceableContent != null) { |
if (firstPlaceableContent != null && secondPlaceableContent != null) { |
||||||
SplitPane( |
SplitPane( |
||||||
modifier = modifier, |
modifier = modifier, |
||||||
isHorizontal = true, |
isHorizontal = true, |
||||||
splitPaneState = splitPaneState, |
splitPaneState = splitPaneState, |
||||||
minimalSizesConfiguration = minimalSizes, |
minimalSizesConfiguration = minimalSizes, |
||||||
first = firstPlaceableContent!!, |
first = firstPlaceableContent!!, |
||||||
second = secondPlaceableContent!!, |
second = secondPlaceableContent!!, |
||||||
splitter = splitter |
splitter = splitter |
||||||
) |
) |
||||||
} else { |
} else { |
||||||
firstPlaceableContent?.invoke() |
firstPlaceableContent?.invoke() |
||||||
secondPlaceableContent?.invoke() |
secondPlaceableContent?.invoke() |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
/** |
/** |
||||||
* Internal implementation of default splitter |
* Internal implementation of default splitter |
||||||
* |
* |
||||||
* @param isHorizontal describes is it horizontal or vertical split pane |
* @param isHorizontal describes is it horizontal or vertical split pane |
||||||
* @param splitPaneState the state object to be used to control or observe the split pane state |
* @param splitPaneState the state object to be used to control or observe the split pane state |
||||||
*/ |
*/ |
||||||
@OptIn(ExperimentalSplitPaneApi::class) |
@OptIn(ExperimentalSplitPaneApi::class) |
||||||
internal expect fun defaultSplitter( |
internal expect fun defaultSplitter( |
||||||
isHorizontal: Boolean, |
isHorizontal: Boolean, |
||||||
splitPaneState: SplitPaneState |
splitPaneState: SplitPaneState |
||||||
): Splitter |
): Splitter |
||||||
|
|
||||||
/** |
/** |
||||||
* Internal implementation of split pane that used in all public composable functions |
* Internal implementation of split pane that used in all public composable functions |
||||||
* |
* |
||||||
* @param modifier the modifier to apply to this layout |
* @param modifier the modifier to apply to this layout |
||||||
* @param isHorizontal describes is it horizontal of vertical split pane |
* @param isHorizontal describes is it horizontal of vertical split pane |
||||||
* @param splitPaneState the state object to be used to control or observe the split pane state |
* @param splitPaneState the state object to be used to control or observe the split pane state |
||||||
* @param minimalSizesConfiguration data class ([MinimalSizes]) that provides minimal size for split pane parts |
* @param minimalSizesConfiguration data class ([MinimalSizes]) that provides minimal size for split pane parts |
||||||
* @param first first part of split pane, left or top according to [isHorizontal] |
* @param first first part of split pane, left or top according to [isHorizontal] |
||||||
* @param second second part of split pane, right or bottom according to [isHorizontal] |
* @param second second part of split pane, right or bottom according to [isHorizontal] |
||||||
* @param splitter separator composable, by default [Splitter] is used |
* @param splitter separator composable, by default [Splitter] is used |
||||||
* */ |
* */ |
||||||
@Composable |
@Composable |
||||||
internal expect fun SplitPane( |
internal expect fun SplitPane( |
||||||
modifier: Modifier = Modifier, |
modifier: Modifier = Modifier, |
||||||
isHorizontal: Boolean = true, |
isHorizontal: Boolean = true, |
||||||
splitPaneState: SplitPaneState, |
splitPaneState: SplitPaneState, |
||||||
minimalSizesConfiguration: MinimalSizes = MinimalSizes(0.dp, 0.dp), |
minimalSizesConfiguration: MinimalSizes = MinimalSizes(0.dp, 0.dp), |
||||||
first: @Composable () -> Unit, |
first: @Composable () -> Unit, |
||||||
second: @Composable () -> Unit, |
second: @Composable () -> Unit, |
||||||
splitter: Splitter |
splitter: Splitter |
||||||
) |
) |
@ -1,191 +1,188 @@ |
|||||||
package org.jetbrains.compose.splitpane |
package org.jetbrains.compose.splitpane |
||||||
|
|
||||||
import androidx.compose.foundation.InteractionState |
import androidx.compose.foundation.gestures.detectDragGestures |
||||||
import androidx.compose.foundation.gestures.detectDragGestures |
import androidx.compose.runtime.Composable |
||||||
import androidx.compose.runtime.Composable |
import androidx.compose.runtime.remember |
||||||
import androidx.compose.runtime.remember |
import androidx.compose.ui.Modifier |
||||||
import androidx.compose.ui.Modifier |
import androidx.compose.ui.input.pointer.consumeAllChanges |
||||||
import androidx.compose.ui.input.pointer.consumeAllChanges |
import androidx.compose.ui.input.pointer.pointerInput |
||||||
import androidx.compose.ui.input.pointer.pointerInput |
import androidx.compose.ui.unit.Dp |
||||||
import androidx.compose.ui.unit.Dp |
import androidx.compose.ui.unit.dp |
||||||
import androidx.compose.ui.unit.dp |
|
||||||
|
/** Receiver scope which is used by [HorizontalSplitPane] and [VerticalSplitPane] */ |
||||||
/** Receiver scope which is used by [HorizontalSplitPane] and [VerticalSplitPane] */ |
@ExperimentalSplitPaneApi |
||||||
@ExperimentalSplitPaneApi |
interface SplitPaneScope { |
||||||
interface SplitPaneScope { |
|
||||||
|
/** |
||||||
/** |
* Set up first composable item if SplitPane, for [HorizontalSplitPane] it will be |
||||||
* Set up first composable item if SplitPane, for [HorizontalSplitPane] it will be |
* Right part, for [VerticalSplitPane] it will be Top part |
||||||
* Right part, for [VerticalSplitPane] it will be Top part |
* @param minSize a minimal size of composable item. |
||||||
* @param minSize a minimal size of composable item. |
* For [HorizontalSplitPane] it will be minimal width, for [VerticalSplitPane] it wil be minimal Heights. |
||||||
* For [HorizontalSplitPane] it will be minimal width, for [VerticalSplitPane] it wil be minimal Heights. |
* In this context minimal mean that this composable item could not be smaller than specified value. |
||||||
* In this context minimal mean that this composable item could not be smaller than specified value. |
* @param content composable item content. |
||||||
* @param content composable item content. |
* */ |
||||||
* */ |
fun first( |
||||||
fun first( |
minSize: Dp = 0.dp, |
||||||
minSize: Dp = 0.dp, |
content: @Composable () -> Unit |
||||||
content: @Composable () -> Unit |
) |
||||||
) |
|
||||||
|
/** |
||||||
/** |
* Set up second composable item if SplitPane. |
||||||
* Set up second composable item if SplitPane. |
* For [HorizontalSplitPane] it will be Left part, for [VerticalSplitPane] it will be Bottom part |
||||||
* For [HorizontalSplitPane] it will be Left part, for [VerticalSplitPane] it will be Bottom part |
* @param minSize a minimal size of composable item. |
||||||
* @param minSize a minimal size of composable item. |
* For [HorizontalSplitPane] it will be minimal width, for [VerticalSplitPane] it wil be minimal Heights. |
||||||
* For [HorizontalSplitPane] it will be minimal width, for [VerticalSplitPane] it wil be minimal Heights. |
* In this context minimal mean that this composable item could not be smaller than specified value. |
||||||
* In this context minimal mean that this composable item could not be smaller than specified value. |
* @param content composable item content. |
||||||
* @param content composable item content. |
* */ |
||||||
* */ |
fun second( |
||||||
fun second( |
minSize: Dp = 0.dp, |
||||||
minSize: Dp = 0.dp, |
content: @Composable () -> Unit |
||||||
content: @Composable () -> Unit |
) |
||||||
) |
|
||||||
|
fun splitter(block: SplitterScope.() -> Unit) |
||||||
fun splitter(block: SplitterScope.() -> Unit) |
|
||||||
|
} |
||||||
} |
|
||||||
|
/** Receiver scope which is used by [SplitterScope] */ |
||||||
/** Receiver scope which is used by [SplitterScope] */ |
@ExperimentalSplitPaneApi |
||||||
@ExperimentalSplitPaneApi |
interface HandleScope { |
||||||
interface HandleScope { |
/** allow mark composable as movable handle */ |
||||||
/** allow mark composable as movable handle */ |
fun Modifier.markAsHandle(): Modifier |
||||||
fun Modifier.markAsHandle(): Modifier |
} |
||||||
} |
|
||||||
|
/** Receiver scope which is used by [SplitPaneScope] */ |
||||||
/** Receiver scope which is used by [SplitPaneScope] */ |
@ExperimentalSplitPaneApi |
||||||
@ExperimentalSplitPaneApi |
interface SplitterScope { |
||||||
interface SplitterScope { |
/** |
||||||
/** |
* Set up visible part of splitter. This part will be measured and placed between split pane |
||||||
* Set up visible part of splitter. This part will be measured and placed between split pane |
* parts (first and second) |
||||||
* parts (first and second) |
* |
||||||
* |
* @param content composable item content |
||||||
* @param content composable item content |
* */ |
||||||
* */ |
fun visiblePart(content: @Composable () -> Unit) |
||||||
fun visiblePart(content: @Composable () -> Unit) |
|
||||||
|
/** |
||||||
/** |
* Set up handle part, this part of splitter would be measured and placed above [visiblePart] content. |
||||||
* Set up handle part, this part of splitter would be measured and placed above [visiblePart] content. |
* Size of handle will have no effect on split pane parts (first and second) sizes. |
||||||
* Size of handle will have no effect on split pane parts (first and second) sizes. |
* |
||||||
* |
* @param alignment alignment of handle according to [visiblePart] could be: |
||||||
* @param alignment alignment of handle according to [visiblePart] could be: |
* * [SplitterHandleAlignment.BEFORE] if you place handle before [visiblePart], |
||||||
* * [SplitterHandleAlignment.BEFORE] if you place handle before [visiblePart], |
* * [SplitterHandleAlignment.ABOVE] if you place handle above [visiblePart] (will be centered) |
||||||
* * [SplitterHandleAlignment.ABOVE] if you place handle above [visiblePart] (will be centered) |
* * and [SplitterHandleAlignment.AFTER] if you place handle after [visiblePart]. |
||||||
* * and [SplitterHandleAlignment.AFTER] if you place handle after [visiblePart]. |
* |
||||||
* |
* @param content composable item content provider. Uses [HandleScope] to allow mark any provided composable part |
||||||
* @param content composable item content provider. Uses [HandleScope] to allow mark any provided composable part |
* as handle. |
||||||
* as handle. |
* [content] will be placed only if [SplitPaneState.moveEnabled] is true |
||||||
* [content] will be placed only if [SplitPaneState.moveEnabled] is true |
*/ |
||||||
*/ |
fun handle( |
||||||
fun handle( |
alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE, |
||||||
alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE, |
content: @Composable HandleScope.() -> Unit |
||||||
content: @Composable HandleScope.() -> Unit |
) |
||||||
) |
} |
||||||
} |
|
||||||
|
@OptIn(ExperimentalSplitPaneApi::class) |
||||||
@OptIn(ExperimentalSplitPaneApi::class) |
internal class HandleScopeImpl( |
||||||
internal class HandleScopeImpl( |
private val containerScope: SplitPaneScopeImpl |
||||||
private val containerScope: SplitPaneScopeImpl |
) : HandleScope { |
||||||
) : HandleScope { |
override fun Modifier.markAsHandle(): Modifier = this.pointerInput(containerScope.splitPaneState) { |
||||||
override fun Modifier.markAsHandle(): Modifier = this.pointerInput(containerScope.splitPaneState) { |
detectDragGestures { change, _ -> |
||||||
detectDragGestures { change, _ -> |
change.consumeAllChanges() |
||||||
change.consumeAllChanges() |
containerScope.splitPaneState.dispatchRawMovement( |
||||||
containerScope.splitPaneState.dispatchRawMovement( |
if (containerScope.isHorizontal) change.position.x else change.position.y |
||||||
if (containerScope.isHorizontal) change.position.x else change.position.y |
) |
||||||
) |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
@OptIn(ExperimentalSplitPaneApi::class) |
||||||
@OptIn(ExperimentalSplitPaneApi::class) |
internal class SplitterScopeImpl( |
||||||
internal class SplitterScopeImpl( |
private val containerScope: SplitPaneScopeImpl |
||||||
private val containerScope: SplitPaneScopeImpl |
) : SplitterScope { |
||||||
) : SplitterScope { |
|
||||||
|
override fun visiblePart(content: @Composable () -> Unit) { |
||||||
override fun visiblePart(content: @Composable () -> Unit) { |
containerScope.visiblePart = content |
||||||
containerScope.visiblePart = content |
} |
||||||
} |
|
||||||
|
override fun handle( |
||||||
override fun handle( |
alignment: SplitterHandleAlignment, |
||||||
alignment: SplitterHandleAlignment, |
content: @Composable HandleScope.() -> Unit |
||||||
content: @Composable HandleScope.() -> Unit |
) { |
||||||
) { |
containerScope.handle = { HandleScopeImpl(containerScope).content() } |
||||||
containerScope.handle = { HandleScopeImpl(containerScope).content() } |
containerScope.alignment = alignment |
||||||
containerScope.alignment = alignment |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
private typealias ComposableSlot = @Composable () -> Unit |
||||||
private typealias ComposableSlot = @Composable () -> Unit |
|
||||||
|
@OptIn(ExperimentalSplitPaneApi::class) |
||||||
@OptIn(ExperimentalSplitPaneApi::class) |
internal class SplitPaneScopeImpl( |
||||||
internal class SplitPaneScopeImpl( |
internal val isHorizontal: Boolean, |
||||||
internal val isHorizontal: Boolean, |
internal val splitPaneState: SplitPaneState |
||||||
internal val splitPaneState: SplitPaneState |
) : SplitPaneScope { |
||||||
) : SplitPaneScope { |
|
||||||
|
private var firstPlaceableMinimalSize: Dp = 0.dp |
||||||
private var firstPlaceableMinimalSize: Dp = 0.dp |
private var secondPlaceableMinimalSize: Dp = 0.dp |
||||||
private var secondPlaceableMinimalSize: Dp = 0.dp |
|
||||||
|
internal val minimalSizes: MinimalSizes |
||||||
internal val minimalSizes: MinimalSizes |
get() = MinimalSizes(firstPlaceableMinimalSize, secondPlaceableMinimalSize) |
||||||
get() = MinimalSizes(firstPlaceableMinimalSize, secondPlaceableMinimalSize) |
|
||||||
|
internal var firstPlaceableContent: ComposableSlot? = null |
||||||
internal var firstPlaceableContent: ComposableSlot? = null |
private set |
||||||
private set |
internal var secondPlaceableContent: ComposableSlot? = null |
||||||
internal var secondPlaceableContent: ComposableSlot? = null |
private set |
||||||
private set |
|
||||||
|
internal lateinit var visiblePart: ComposableSlot |
||||||
internal lateinit var visiblePart: ComposableSlot |
internal lateinit var handle: ComposableSlot |
||||||
internal lateinit var handle: ComposableSlot |
internal var alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE |
||||||
internal var alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE |
internal val splitter |
||||||
internal val splitter |
get() = |
||||||
get() = |
if (this::visiblePart.isInitialized && this::handle.isInitialized) { |
||||||
if (this::visiblePart.isInitialized && this::handle.isInitialized) { |
Splitter(visiblePart, handle, alignment) |
||||||
Splitter(visiblePart, handle, alignment) |
} else { |
||||||
} else { |
defaultSplitter(isHorizontal, splitPaneState) |
||||||
defaultSplitter(isHorizontal, splitPaneState) |
} |
||||||
} |
|
||||||
|
override fun first( |
||||||
override fun first( |
minSize: Dp, |
||||||
minSize: Dp, |
content: @Composable () -> Unit |
||||||
content: @Composable () -> Unit |
) { |
||||||
) { |
firstPlaceableMinimalSize = minSize |
||||||
firstPlaceableMinimalSize = minSize |
firstPlaceableContent = content |
||||||
firstPlaceableContent = content |
} |
||||||
} |
|
||||||
|
override fun second( |
||||||
override fun second( |
minSize: Dp, |
||||||
minSize: Dp, |
content: @Composable () -> Unit |
||||||
content: @Composable () -> Unit |
) { |
||||||
) { |
secondPlaceableMinimalSize = minSize |
||||||
secondPlaceableMinimalSize = minSize |
secondPlaceableContent = content |
||||||
secondPlaceableContent = content |
} |
||||||
} |
|
||||||
|
override fun splitter(block: SplitterScope.() -> Unit) { |
||||||
override fun splitter(block: SplitterScope.() -> Unit) { |
SplitterScopeImpl(this).block() |
||||||
SplitterScopeImpl(this).block() |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
/** |
||||||
/** |
* creates a [SplitPaneState] and remembers it across composition |
||||||
* creates a [SplitPaneState] and remembers it across composition |
* |
||||||
* |
* Changes to the provided initial values will **not** result in the state being recreated or |
||||||
* Changes to the provided initial values will **not** result in the state being recreated or |
* changed in any way if it has already been created. |
||||||
* changed in any way if it has already been created. |
* |
||||||
* |
* @param initialPositionPercentage the initial value for [SplitPaneState.positionPercentage] |
||||||
* @param initialPositionPercentage the initial value for [SplitPaneState.positionPercentage] |
* @param moveEnabled the initial value for [SplitPaneState.moveEnabled] |
||||||
* @param moveEnabled the initial value for [SplitPaneState.moveEnabled] |
* @param interactionState the initial value for [SplitPaneState.interactionState] |
||||||
* @param interactionState the initial value for [SplitPaneState.interactionState] |
* */ |
||||||
* */ |
@ExperimentalSplitPaneApi |
||||||
@ExperimentalSplitPaneApi |
@Composable |
||||||
@Composable |
fun rememberSplitPaneState( |
||||||
fun rememberSplitPaneState( |
initialPositionPercentage: Float = 0f, |
||||||
initialPositionPercentage: Float = 0f, |
moveEnabled: Boolean = true |
||||||
moveEnabled: Boolean = true, |
): SplitPaneState { |
||||||
interactionState: InteractionState = remember { InteractionState() } |
return remember { |
||||||
): SplitPaneState { |
SplitPaneState( |
||||||
return remember { |
moveEnabled = moveEnabled, |
||||||
SplitPaneState( |
initialPositionPercentage = initialPositionPercentage |
||||||
moveEnabled = moveEnabled, |
) |
||||||
initialPositionPercentage = initialPositionPercentage, |
} |
||||||
interactionState = interactionState |
|
||||||
) |
|
||||||
} |
|
||||||
} |
} |
@ -1,3 +1,9 @@ |
|||||||
OLDVER=0.3.0-rc1 |
#!/bin/bash |
||||||
NEWVER=0.3.0 |
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/.. |
||||||
find -E ../ -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$OLDVER/$NEWVER/g" {} \; |
COMPOSE_OLDVER=0.3.0 |
||||||
|
COMPOSE_NEWVER=0.3.1 |
||||||
|
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$COMPOSE_OLDVER/$COMPOSE_NEWVER/g" {} \; |
||||||
|
APPCOMPAT_OLDVER=1.1.0 |
||||||
|
APPCOMPAT_NEWVER=1.3.0-beta01 |
||||||
|
find -E $ROOT -regex '.*\.(kts|properties|kt)' -exec sed -i '' -e "s/$APPCOMPAT_OLDVER/$APPCOMPAT_NEWVER/g" {} \; |
||||||
|
|
||||||
|
Loading…
Reference in new issue