Fixed corners in ComitChanges message

This commit is contained in:
Abdelilah El Aissaoui 2021-09-24 21:32:56 +02:00
parent 9b971d844d
commit 3a7afa9d08

View file

@ -8,6 +8,7 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.res.useResource import androidx.compose.ui.res.useResource
@ -45,18 +46,21 @@ fun CommitChanges(commitDiff: Pair<RevCommit, List<DiffEntry>>, onDiffSelected:
.fillMaxWidth(), .fillMaxWidth(),
) { ) {
val scroll = rememberScrollState(0) val scroll = rememberScrollState(0)
Card (modifier = Modifier Card(
.fillMaxWidth() modifier = Modifier
.height(120.dp) .padding(8.dp)
.padding(8.dp) .fillMaxWidth()
.background(MaterialTheme.colors.surface)) { .height(120.dp)
Text( ) {
text = commit.fullMessage, Box {
modifier = Modifier Text(
.fillMaxSize() text = commit.fullMessage,
.verticalScroll(scroll), modifier = Modifier
.fillMaxSize()
) .padding(8.dp)
.verticalScroll(scroll),
)
}
} }