Andreas 0f4923baa9 Add missing top padding for screen that was rewritten in Compose (#7145)
(cherry picked from commit fb83a07f843e8cec2dc935f1b4eed6351aff672b)
2022-05-15 21:54:33 -04:00

21 lines
859 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.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(),
)
}