arkon 7fdbf40cd2 Minor cleanups
Pulling out some of the smaller changes that aren't related to the manga controller changes in #7244
2022-06-04 16:01:49 -04:00

23 lines
930 B
Kotlin

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.runtime.ReadOnlyComposable
import androidx.compose.ui.platform.LocalLayoutDirection
@Composable
@ReadOnlyComposable
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(),
)
}