From 5fd2f7d09b929a96251bbd88a18606ca327409eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de> Date: Wed, 14 Aug 2024 16:35:22 +0200 Subject: [PATCH] Fix issue with colons in dependencies list now visible The colons are in min-width columns and supposed not to be visible, they're there only for copy and pasting entire rows. Now they're transparent so not visible any longer. --- .../org/briarproject/briar/desktop/ui/AboutScreen.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt index 5e699d2763..dc1af530e6 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt @@ -31,6 +31,7 @@ import androidx.compose.ui.Alignment.Companion.CenterStart import androidx.compose.ui.Alignment.Companion.CenterVertically import androidx.compose.ui.Alignment.Companion.TopStart import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.semantics @@ -228,10 +229,10 @@ private fun LibraryEntry(artifact: Artifact) = // Add tiny cells in between so that one can select a row, copy and paste // it somewhere and appear like "group:artifact:version license". Cell(colSizesLibraries[0], artifact.group) - Cell(MIN_VALUE, ":") + Cell(MIN_VALUE, ":", color = Color.Transparent) VerticalDivider() Cell(colSizesLibraries[1], artifact.artifact) - Cell(MIN_VALUE, ":") + Cell(MIN_VALUE, ":", color = Color.Transparent) VerticalDivider() Cell(colSizesLibraries[2], artifact.version) Cell(MIN_VALUE, "\t") @@ -241,10 +242,11 @@ private fun LibraryEntry(artifact: Artifact) = } @Composable -private fun RowScope.Cell(size: Float, text: String) = +private fun RowScope.Cell(size: Float, text: String, color: Color = Color.Unspecified) = Box(modifier = Modifier.weight(size).fillMaxHeight()) { Text( text = text, + color = color, modifier = Modifier.fillMaxWidth().padding(8.dp).align(CenterStart) ) } -- GitLab