chore: Adjust status header design

This commit is contained in:
krille-chan 2025-09-14 12:33:19 +02:00
commit 9224a7aea4
No known key found for this signature in database

View file

@ -150,10 +150,21 @@ class PresenceAvatar extends StatelessWidget {
borderRadius: borderRadius:
BorderRadius.circular(avatarSize), BorderRadius.circular(avatarSize),
), ),
alignment: Alignment.center,
child: Container(
height: avatarSize - 6,
alignment: Alignment.center,
decoration: BoxDecoration(
color: theme.colorScheme.surface,
borderRadius:
BorderRadius.circular(avatarSize),
),
padding: const EdgeInsets.all(3.0),
child: Avatar( child: Avatar(
name: displayName, name: displayName,
mxContent: profile?.avatarUrl, mxContent: profile?.avatarUrl,
size: avatarSize - 6, size: avatarSize - 12,
),
), ),
), ),
if (presence.userid == client.userID) if (presence.userid == client.userID)
@ -184,7 +195,13 @@ class PresenceAvatar extends StatelessWidget {
left: 0, left: 0,
top: 0, top: 0,
right: 8, right: 8,
child: Material( child: Column(
spacing: 2,
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Material(
elevation: statusMsgBubbleElevation, elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor, shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
@ -192,7 +209,10 @@ class PresenceAvatar extends StatelessWidget {
), ),
color: statusMsgBubbleColor, color: statusMsgBubbleColor,
child: Padding( child: Padding(
padding: const EdgeInsets.all(2.0), padding: const EdgeInsets.symmetric(
vertical: 2.0,
horizontal: 4.0,
),
child: Text( child: Text(
statusMsg, statusMsg,
maxLines: 2, maxLines: 2,
@ -204,40 +224,42 @@ class PresenceAvatar extends StatelessWidget {
), ),
), ),
), ),
), Padding(
Positioned( padding:
left: 8, const EdgeInsets.only(left: 8.0),
top: 32,
child: Material( child: Material(
color: statusMsgBubbleColor, color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation, elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor, shadowColor:
statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2, AppConfig.borderRadius,
), ),
child: const SizedBox( child: const SizedBox.square(
width: 8, dimension: 8,
height: 8,
), ),
), ),
), ),
Positioned( Padding(
left: 14, padding:
top: 40, const EdgeInsets.only(left: 13.0),
child: Material( child: Material(
color: statusMsgBubbleColor, color: statusMsgBubbleColor,
elevation: statusMsgBubbleElevation, elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor, shadowColor:
statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2, AppConfig.borderRadius,
), ),
child: const SizedBox( child: const SizedBox.square(
width: 4, dimension: 5,
height: 4,
), ),
), ),
), ),
], ],
),
),
],
], ],
), ),
), ),