Vertical-align lock icon with trash icon in category rows #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The lock icon on default categories (e.g. "Uncategorized") does not line up vertically with the trash icon on user categories (e.g. "Transport"). See attached screenshot — the trash sits roughly centered with the row text, the lock sits noticeably higher.
Root cause —
app/src/main/java/dev/achmad/ledgerr/ui/screens/category/CategoryScreen.kt:203-216The trash branch is wrapped in an
IconButton(which has a 48.dp defaultIconButtonDefaults.iconButtonSizeand intrinsic padding that vertically centers the icon relative to the row). The lock branch is a bareIconwhose size is the icon's intrinsic bounds (24.dp), so it sits at a different visual center than the trash.Fix
Render the lock branch the same way as the trash branch — wrap it in an
IconButton(onClick = { /* no-op */ }, enabled = false)(or useIconButtonwithonClick = {}and anullcontent description makes the button disabled visually but still reserves the same hit area). The disabled state is the correct semantic for "cannot interact" and matches the visual size of the trash button, so both icons sit at the same y-offset.Acceptance criteria
enabled = falseon theIconButton, or a non-clickable wrapper — pick the one that keeps the icon visually identical to the trash.admin referenced this issue2026-06-28 14:00:13 +00:00