mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
fix(AppBar): Also adjust the other placeables' padding
This commit is contained in:
parent
8b53e5ad10
commit
d2ddf7dfb0
1 changed files with 3 additions and 6 deletions
|
@ -475,13 +475,11 @@ private class TopAppBarMeasurePolicy(
|
|||
y =
|
||||
when (titleVerticalArrangement) {
|
||||
Arrangement.Bottom -> {
|
||||
val padding = (constraints.maxHeight - navigationIconPlaceable.height) / 2
|
||||
val paddingFromBottom = padding - (navigationIconPlaceable.height - titleBaseline)
|
||||
val paddingFromBottom = (constraints.maxHeight - (navigationIconPlaceable.height - titleBaseline)) / 2
|
||||
val heightWithPadding = paddingFromBottom + navigationIconPlaceable.height
|
||||
val adjustedBottomPadding =
|
||||
if (heightWithPadding > constraints.maxHeight) {
|
||||
paddingFromBottom -
|
||||
(heightWithPadding - constraints.maxHeight)
|
||||
paddingFromBottom - (heightWithPadding - constraints.maxHeight)
|
||||
} else {
|
||||
paddingFromBottom
|
||||
}
|
||||
|
@ -557,8 +555,7 @@ private class TopAppBarMeasurePolicy(
|
|||
y =
|
||||
when (titleVerticalArrangement) {
|
||||
Arrangement.Bottom -> {
|
||||
val padding = (constraints.maxHeight - actionIconsPlaceable.height) / 2
|
||||
val paddingFromBottom = padding - (actionIconsPlaceable.height - titleBaseline)
|
||||
val paddingFromBottom = (constraints.maxHeight - (actionIconsPlaceable.height - titleBaseline)) / 2
|
||||
val heightWithPadding = paddingFromBottom + actionIconsPlaceable.height
|
||||
val adjustedBottomPadding =
|
||||
if (heightWithPadding > constraints.maxHeight) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue