Skip to content

Commit 39da3bd

Browse files
committed
Fix width in TrafficStatRow
1 parent 13d3490 commit 39da3bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/src/main/java/com/pcapplusplus/toyvpn/StatsScreen.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,17 @@ fun TrafficStatRow(stat: TrafficStat) {
237237
Text(
238238
text = stat.label,
239239
style = MaterialTheme.typography.titleMedium.copy(fontSize = 20.sp),
240-
modifier = Modifier.wrapContentWidth(Alignment.Start).testTag("${stat.testTag}_label"),
240+
modifier = Modifier.wrapContentWidth(Alignment.Start).padding(end = 5.dp).weight(3f).testTag("${stat.testTag}_label"),
241241
)
242-
Spacer(modifier = Modifier.width(8.dp))
243242
ProgressBar(
244-
modifier = Modifier.weight(1f).testTag("${stat.testTag}_progress"),
243+
modifier = Modifier.weight(10f).testTag("${stat.testTag}_progress"),
245244
count = stat.count,
246245
total = if (stat.total != 0) stat.total else 1,
247246
)
248247
Text(
249248
text = stat.count.humanize(),
250249
style = MaterialTheme.typography.titleMedium.copy(fontSize = 20.sp),
251-
modifier = Modifier.align(Alignment.CenterVertically).testTag("${stat.testTag}_count"),
250+
modifier = Modifier.align(Alignment.CenterVertically).padding(start = 5.dp).weight(4f).testTag("${stat.testTag}_count"),
252251
textAlign = TextAlign.End,
253252
)
254253
}

0 commit comments

Comments
 (0)