Skip to content
Snippets Groups Projects
Verified Commit 5fd2f7d0 authored by Sebastian's avatar Sebastian
Browse files

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.
parent 36f93102
No related tags found
1 merge request!379Fix issue with colons in dependencies list now visible
Pipeline #16835 passed
...@@ -31,6 +31,7 @@ import androidx.compose.ui.Alignment.Companion.CenterStart ...@@ -31,6 +31,7 @@ import androidx.compose.ui.Alignment.Companion.CenterStart
import androidx.compose.ui.Alignment.Companion.CenterVertically import androidx.compose.ui.Alignment.Companion.CenterVertically
import androidx.compose.ui.Alignment.Companion.TopStart import androidx.compose.ui.Alignment.Companion.TopStart
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.semantics
...@@ -228,10 +229,10 @@ private fun LibraryEntry(artifact: Artifact) = ...@@ -228,10 +229,10 @@ private fun LibraryEntry(artifact: Artifact) =
// Add tiny cells in between so that one can select a row, copy and paste // Add tiny cells in between so that one can select a row, copy and paste
// it somewhere and appear like "group:artifact:version license". // it somewhere and appear like "group:artifact:version license".
Cell(colSizesLibraries[0], artifact.group) Cell(colSizesLibraries[0], artifact.group)
Cell(MIN_VALUE, ":") Cell(MIN_VALUE, ":", color = Color.Transparent)
VerticalDivider() VerticalDivider()
Cell(colSizesLibraries[1], artifact.artifact) Cell(colSizesLibraries[1], artifact.artifact)
Cell(MIN_VALUE, ":") Cell(MIN_VALUE, ":", color = Color.Transparent)
VerticalDivider() VerticalDivider()
Cell(colSizesLibraries[2], artifact.version) Cell(colSizesLibraries[2], artifact.version)
Cell(MIN_VALUE, "\t") Cell(MIN_VALUE, "\t")
...@@ -241,10 +242,11 @@ private fun LibraryEntry(artifact: Artifact) = ...@@ -241,10 +242,11 @@ private fun LibraryEntry(artifact: Artifact) =
} }
@Composable @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()) { Box(modifier = Modifier.weight(size).fillMaxHeight()) {
Text( Text(
text = text, text = text,
color = color,
modifier = Modifier.fillMaxWidth().padding(8.dp).align(CenterStart) modifier = Modifier.fillMaxWidth().padding(8.dp).align(CenterStart)
) )
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment