Softer position
This commit is contained in:
+4
-1
@@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.Box
|
|||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
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 com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,8 +36,10 @@ import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
|||||||
* The system-navigation-bar inset is already handled by the surrounding Scaffold, so
|
* The system-navigation-bar inset is already handled by the surrounding Scaffold, so
|
||||||
* only the bar's content height needs to be reserved.
|
* only the bar's content height needs to be reserved.
|
||||||
*/
|
*/
|
||||||
|
val FABPaddingFromBottom = 30.dp
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Modifier.fabBottomBarPadding(nav: INav): Modifier = if (nav.canPop()) padding(bottom = AppBottomBarHeight) else this
|
fun Modifier.fabBottomBarPadding(nav: INav): Modifier = if (nav.canPop()) padding(bottom = FABPaddingFromBottom) else this
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience wrapper that places [content] in a [Box] with [fabBottomBarPadding] applied.
|
* Convenience wrapper that places [content] in a [Box] with [fabBottomBarPadding] applied.
|
||||||
|
|||||||
Reference in New Issue
Block a user