Skip to content

Commit

Permalink
fixup! TW-1902 update icons, text style
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim committed Aug 23, 2024
1 parent 58187ed commit 279417c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/pages/chat_list/chat_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ChatListItem extends StatelessWidget with ChatListItemMixin {
return Padding(
padding: ChatListItemStyle.paddingConversation,
child: Material(
borderRadius: BorderRadius.circular(4),
borderRadius: ChatListItemStyle.chatlistItemBorderRadius,
clipBehavior: Clip.hardEdge,
color: isSelectedItem
? Theme.of(context).colorScheme.primaryContainer
Expand Down
8 changes: 7 additions & 1 deletion lib/pages/chat_list/chat_list_item_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ class ChatListItemStyle {
: 0.0;
}

static const EdgeInsets paddingConversation = EdgeInsets.all(
static const EdgeInsets paddingConversation = EdgeInsets.fromLTRB(
8,
8,
8,
0,
);

static const EdgeInsetsDirectional paddingAvatar =
Expand All @@ -55,4 +58,7 @@ class ChatListItemStyle {
}

static const double letterSpaceDisplayName = 0.15;

static final chatlistItemBorderRadius = BorderRadius.circular(4);
static const paddingIcon = EdgeInsets.only(bottom: 4);
}
4 changes: 2 additions & 2 deletions lib/pages/chat_list/chat_list_item_subtitle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin {
color: room.lastEvent!.receipts.isEmpty
? LinagoraRefColors.material().tertiary[30]
: LinagoraSysColors.material().secondary,
size: 20,
size: ChatListItemStyle.readIconSize,
)
: AnimatedContainer(
duration: TwakeThemes.animationDuration,
curve: TwakeThemes.animationCurve,
padding: const EdgeInsets.only(bottom: 4),
padding: ChatListItemStyle.paddingIcon,
height: ChatListItemStyle.mentionIconWidth,
width: isMentionned && room.isUnreadOrInvited
? ChatListItemStyle.mentionIconWidth
Expand Down
8 changes: 4 additions & 4 deletions lib/pages/chat_list/chat_list_view_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ class ChatListViewBuilder extends StatelessWidget {
},
separatorBuilder: (BuildContext context, int index) {
return Divider(
height: 1,
thickness: 1,
indent: 8,
endIndent: 8,
height: ChatListViewStyle.dividerHeight,
thickness: ChatListViewStyle.dividerThickness,
indent: ChatListViewStyle.dividerIndent,
endIndent: ChatListViewStyle.dividerIndent,
color: LinagoraStateLayer(LinagoraSysColors.material().surfaceTint)
.opacityLayer3,
);
Expand Down
4 changes: 4 additions & 0 deletions lib/pages/chat_list/chat_list_view_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ class ChatListViewStyle {
? LinagoraRefColors.material().primary[50]
: LinagoraRefColors.material().primary[40];
}

static double dividerHeight = 1.0;
static double dividerIndent = 8.0;
static double dividerThickness = 1.0;
}

0 comments on commit 279417c

Please sign in to comment.