21 lines
859 B
Kotlin
Raw Normal View History

package eu.kanade.presentation.util
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalLayoutDirection
@Composable
operator fun PaddingValues.plus(other: PaddingValues): PaddingValues {
val layoutDirection = LocalLayoutDirection.current
return PaddingValues(
start = calculateStartPadding(layoutDirection) +
other.calculateStartPadding(layoutDirection),
end = calculateEndPadding(layoutDirection) +
other.calculateEndPadding(layoutDirection),
top = calculateTopPadding() + other.calculateTopPadding(),
bottom = calculateBottomPadding() + other.calculateBottomPadding(),
)
}