mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-03 03:17:21 +00:00
feat(map): 网格通联详情呼号列加宽(次数列不再等分,字样位置不变)
工作网格 QSO 详情弹窗里,中间那一列(通联行的「n QSO」、标记行的「标记」) 原来和左右两列一样占 weight(1f)(各 1/3 宽),而该列文字是居中的,字样两侧的 空白被白白占用。现改为按内容宽度占位(去掉 weight(1f)),左右两列仍各占 weight(1f):两外列等分剩余宽度 ⇒ 中列起点正好落在原居中字样的左边界, 因此 - 「n QSO」「标记」字形位置与之前逐像素一致,日期与展开箭头(右对齐)不动; - 省出的中列左半空白全部交给呼号列,呼号列宽度由 W/3 增至 (W - 字样宽)/2, 411dp 屏约 +33dp,长呼号(含 /P、活动特别呼号)多显示约 3 个字符, 并可一直排到「n QSO」字样左侧才省略。 仅影响地图页「网格通联详情」弹窗内的两类行;设置页日志本行本就是 「呼号 weight + 尾部标签 wrap-content」,口径已一致,未改动。
This commit is contained in:
1 parent
1fd1459ddf
commit
135ecb861d
1 file changed
+11
-5
@@ -730,11 +730,12 @@ private fun MarkedStationRow(
|
||||
)
|
||||
// "标记" column: pin icon (only when the grid has multiple marks) sits
|
||||
// left of the label; pinned (first) row's icon is grey, others pale
|
||||
// yellow — tapping moves that mark to the top.
|
||||
// yellow — tapping moves that mark to the top. Wrap-content (no weight),
|
||||
// same as the count column of the QSO rows, so the callsign column next
|
||||
// to it takes the leftover width while these glyphs stay row-centred.
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
modifier = Modifier.weight(1f)
|
||||
horizontalArrangement = Arrangement.Center
|
||||
) {
|
||||
if (showPin) {
|
||||
Icon(
|
||||
@@ -807,8 +808,13 @@ private fun WorkedGridCallRow(
|
||||
else stringResource(R.string.grid_qso_count_many, callQsos.size),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
textAlign = androidx.compose.ui.text.style.TextAlign.Center,
|
||||
modifier = Modifier.weight(1f)
|
||||
textAlign = androidx.compose.ui.text.style.TextAlign.Center
|
||||
// No weight: the count column wraps its content, so the callsign
|
||||
// column (weight 1f, opposite the date column) absorbs the slack
|
||||
// that used to sit left of the centred count text. The count text
|
||||
// keeps its exact on-screen position: with equal weights on the
|
||||
// outer columns the wrap-content middle column starts where the
|
||||
// centred text used to start, i.e. its centre stays at row centre.
|
||||
)
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
|
||||
Reference in new issue
Block a user