mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 03:58:56 +01:00
Add missing top padding for screen that was rewritten in Compose (#7145)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package eu.kanade.presentation.util
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
val horizontalPadding = 16.dp
|
||||
|
||||
val topPaddingValues = PaddingValues(top = 8.dp)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
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(),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user