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