Timeline header: ensure that the decoration is clickable (#4495)

* Timeline header: ensure that the decoration is clickable, and properly fix the icon rendering.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Benoit Marty 2025-03-28 17:28:24 +01:00 committed by GitHub
parent 020ba00bcf
commit f425965e2e
5 changed files with 13 additions and 15 deletions

View file

@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredWidthIn
import androidx.compose.foundation.layout.statusBars import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
@ -484,14 +483,15 @@ private fun MessagesViewTopBar(
BackButton(onClick = onBackClick) BackButton(onClick = onBackClick)
}, },
title = { title = {
val roundedCornerShape = RoundedCornerShape(8.dp)
Row( Row(
modifier = Modifier
.clip(roundedCornerShape)
.clickable { onRoomDetailsClick() },
horizontalArrangement = Arrangement.spacedBy(4.dp), horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
val roundedCornerShape = RoundedCornerShape(8.dp) val titleModifier = Modifier.weight(1f, fill = false)
val titleModifier = Modifier
.clip(roundedCornerShape)
.clickable { onRoomDetailsClick() }
if (roomName != null && roomAvatar != null) { if (roomName != null && roomAvatar != null) {
RoomAvatarAndNameRow( RoomAvatarAndNameRow(
roomName = roomName, roomName = roomName,
@ -509,7 +509,6 @@ private fun MessagesViewTopBar(
when (dmUserIdentityState) { when (dmUserIdentityState) {
IdentityState.Verified -> { IdentityState.Verified -> {
Icon( Icon(
modifier = Modifier.requiredWidthIn(min = 16.dp),
imageVector = CompoundIcons.Verified(), imageVector = CompoundIcons.Verified(),
tint = ElementTheme.colors.iconSuccessPrimary, tint = ElementTheme.colors.iconSuccessPrimary,
contentDescription = null, contentDescription = null,
@ -517,7 +516,6 @@ private fun MessagesViewTopBar(
} }
IdentityState.VerificationViolation -> { IdentityState.VerificationViolation -> {
Icon( Icon(
modifier = Modifier.requiredWidthIn(min = 16.dp),
imageVector = CompoundIcons.ErrorSolid(), imageVector = CompoundIcons.ErrorSolid(),
tint = ElementTheme.colors.iconCriticalPrimary, tint = ElementTheme.colors.iconCriticalPrimary,
contentDescription = null, contentDescription = null,

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:cc5bf16206197d8f79803b0a53bf9e9f329522855e3e594f775a2d9cf26f1739 oid sha256:9ade5d45c72d66bc1ede4ddd84976981d7cfc59b90bd17c97fcfdf6ed44fdde9
size 60219 size 59753

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b0f89334dbc8f8cb871f6649bcb5b869a8d25193376976cff6e33ad44c724b64 oid sha256:66ad9872af4087c25611715b1d369893daa948aa2e1e4b8bc6fbff6067c3295e
size 60111 size 59685

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c55355ed7ab137016b21ec96a78ae954887d08a2843be9e5f6686015e0792c70 oid sha256:7567339acb87356f182961883bfde348cbfdf406eedefc2ecb54fba9cd26e2f2
size 59695 size 59291

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b00a709eb1e8ed90d193d274ff1449840da856d782f07511698fa4cf1a105a19 oid sha256:668c3e76f40df6ee3d64d595b840d81d62ec3f52474cd2fc261109aedbf46a69
size 59640 size 59291