android/tv: remove avatar padding in userView (#606)

updates tailscale/corp#26199

Removes the avatar padding when the avatar is not focusable.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
pull/607/head
Jonathan Nobels 10 months ago committed by GitHub
parent 7f93377c2f
commit 817121e213
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -51,7 +51,7 @@ fun Avatar(
modifier =
Modifier.conditional(AndroidTVUtil.isAndroidTV(), { padding(4.dp) })
.conditional(
AndroidTVUtil.isAndroidTV(),
AndroidTVUtil.isAndroidTV() && isFocusable,
{
size((size * 1.5f).dp) // Focusable area is larger than the avatar
})

@ -52,7 +52,7 @@ fun UserView(
ListItem(
modifier = modifier,
colors = colors,
leadingContent = { Avatar(profile = profile, size = 36) },
leadingContent = { Avatar(profile = profile, size = 36, isFocusable = false) },
headlineContent = {
AutoResizingText(
text = profile.UserProfile.LoginName,

Loading…
Cancel
Save