mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-08 11:34:18 +08:00
refactor: make then after padding for Modifier
This commit is contained in:
@@ -67,13 +67,15 @@ fun Surface(
|
|||||||
backgroundPrimary = colors.backgroundColor,
|
backgroundPrimary = colors.backgroundColor,
|
||||||
textPrimary = colors.contentColor
|
textPrimary = colors.contentColor
|
||||||
)
|
)
|
||||||
) { Box(Modifier.surface(colors, style).then(modifier), content = content) }
|
) { Box(Modifier.surface(colors, style, modifier), content = content) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Modifier.surface(
|
private fun Modifier.surface(
|
||||||
colors: SurfaceColors,
|
colors: SurfaceColors,
|
||||||
style: SurfaceStyle
|
style: SurfaceStyle,
|
||||||
|
modifier: Modifier
|
||||||
) = background(colors.backgroundColor)
|
) = background(colors.backgroundColor)
|
||||||
|
.then(modifier)
|
||||||
.padding(
|
.padding(
|
||||||
top = style.topPadding.orElse() ?: style.padding,
|
top = style.topPadding.orElse() ?: style.padding,
|
||||||
start = style.startPadding.orElse() ?: style.padding,
|
start = style.startPadding.orElse() ?: style.padding,
|
||||||
|
Reference in New Issue
Block a user