mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-03 20:47:41 +01:00
fix(common-ui): position of title in create post and comment sheets
This commit is contained in:
parent
63d492c388
commit
dffd0db653
@ -4,6 +4,7 @@ import androidx.compose.foundation.background
|
|||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
@ -100,31 +101,34 @@ class CreateCommentScreen(
|
|||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {
|
title = {
|
||||||
Column(
|
Box {
|
||||||
modifier = Modifier.fillMaxWidth().padding(top = Spacing.s),
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(Spacing.s),
|
modifier = Modifier.fillMaxWidth().padding(top = Spacing.s),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
verticalArrangement = Arrangement.spacedBy(Spacing.s),
|
||||||
) {
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
BottomSheetHandle()
|
) {
|
||||||
Text(
|
BottomSheetHandle()
|
||||||
text = stringResource(MR.strings.create_comment_title),
|
Text(
|
||||||
style = MaterialTheme.typography.titleLarge,
|
text = stringResource(MR.strings.create_comment_title),
|
||||||
color = MaterialTheme.colorScheme.onBackground,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
)
|
color = MaterialTheme.colorScheme.onBackground,
|
||||||
}
|
|
||||||
},
|
|
||||||
actions = {
|
|
||||||
IconButton(
|
|
||||||
content = {
|
|
||||||
Icon(
|
|
||||||
imageVector = Icons.Default.Send,
|
|
||||||
contentDescription = null,
|
|
||||||
)
|
)
|
||||||
},
|
|
||||||
onClick = {
|
|
||||||
model.reduce(CreateCommentMviModel.Intent.Send)
|
|
||||||
}
|
}
|
||||||
)
|
Row {
|
||||||
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
IconButton(
|
||||||
|
content = {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.Send,
|
||||||
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
onClick = {
|
||||||
|
model.reduce(CreateCommentMviModel.Intent.Send)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package com.github.diegoberaldin.raccoonforlemmy.core.commonui.createpost
|
package com.github.diegoberaldin.raccoonforlemmy.core.commonui.createpost
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
@ -84,31 +86,34 @@ class CreatePostScreen(
|
|||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {
|
title = {
|
||||||
Column(
|
Box {
|
||||||
modifier = Modifier.fillMaxWidth().padding(top = Spacing.s),
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(Spacing.s),
|
modifier = Modifier.fillMaxWidth().padding(top = Spacing.s),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
verticalArrangement = Arrangement.spacedBy(Spacing.s),
|
||||||
) {
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
BottomSheetHandle()
|
) {
|
||||||
Text(
|
BottomSheetHandle()
|
||||||
text = stringResource(MR.strings.create_post_title),
|
Text(
|
||||||
style = MaterialTheme.typography.titleLarge,
|
text = stringResource(MR.strings.create_post_title),
|
||||||
color = MaterialTheme.colorScheme.onBackground,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
)
|
color = MaterialTheme.colorScheme.onBackground,
|
||||||
}
|
|
||||||
},
|
|
||||||
actions = {
|
|
||||||
IconButton(
|
|
||||||
content = {
|
|
||||||
Icon(
|
|
||||||
imageVector = Icons.Default.Send,
|
|
||||||
contentDescription = null,
|
|
||||||
)
|
)
|
||||||
},
|
|
||||||
onClick = {
|
|
||||||
model.reduce(CreatePostMviModel.Intent.Send)
|
|
||||||
}
|
}
|
||||||
)
|
Row {
|
||||||
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
IconButton(
|
||||||
|
content = {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.Send,
|
||||||
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
onClick = {
|
||||||
|
model.reduce(CreatePostMviModel.Intent.Send)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user