fix: material 3-ise attribution further
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
47b804c0d0
commit
ba40698ad4
|
|
@ -1,41 +1,28 @@
|
||||||
package chat.revolt.components.screens.settings
|
package chat.revolt.components.screens.settings
|
||||||
|
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.material3.ListItem
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.height
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import chat.revolt.R
|
import chat.revolt.R
|
||||||
import chat.revolt.screens.about.Library
|
import chat.revolt.screens.about.Library
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AttributionItem(library: Library, onClick: () -> Unit) {
|
fun AttributionItem(library: Library, onClick: () -> Unit) {
|
||||||
SelectionContainer {
|
ListItem(
|
||||||
Column(
|
headlineContent = {
|
||||||
modifier = Modifier
|
|
||||||
.clickable(onClick = onClick)
|
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(16.dp)
|
|
||||||
) {
|
|
||||||
Text(
|
Text(
|
||||||
text = library.name,
|
text = library.name
|
||||||
style = MaterialTheme.typography.bodyLarge
|
|
||||||
)
|
)
|
||||||
|
},
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
supportingContent = {
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.oss_attribution_tap_to_view_license),
|
text = stringResource(id = R.string.oss_attribution_tap_to_view_license)
|
||||||
style = MaterialTheme.typography.bodySmall
|
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
}
|
modifier = Modifier
|
||||||
|
.clickable(onClick = onClick)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue