Skip to content

Commit

Permalink
change bg color for preview link item
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdat committed Oct 16, 2024
1 parent c860230 commit 2ff612d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ class MessageContentWithTimestampBuilder extends StatelessWidget {
color: event.isOwnMessage
? LinagoraRefColors.material().primary[95]
: responsiveUtils.isMobile(context)
? LinagoraSysColors.material().onPrimary
: Theme.of(context)
.colorScheme
.surfaceContainerHighest,
border: !event.isOwnMessage && responsiveUtils.isMobile(context)
? LinagoraSysColors.material().onPrimary
: Theme.of(context)
.colorScheme
.surfaceContainerHighest,
border: !event.isOwnMessage &&
responsiveUtils.isMobile(context)
? Border.all(
color: MessageStyle.borderColorReceivedBubble,
)
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/chat/events/message_upload_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class _MessageUploadingContentState extends State<MessageUploadingContent>
return Container(
padding: widget.style.paddingFileTileAll,
decoration: ShapeDecoration(
color: widget.style.backgroundColor(context, ownMessage: event.isOwnMessage),
color: widget.style
.backgroundColor(context, ownMessage: event.isOwnMessage),
shape: RoundedRectangleBorder(
borderRadius: widget.style.borderRadius,
),
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/file_widget/base_file_tile_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class BaseFileTileWidget extends StatelessWidget {
return Container(
padding: style.paddingFileTileAll,
decoration: ShapeDecoration(
color: backgroundColor ?? style.backgroundColor(context, ownMessage: ownMessage),
color: backgroundColor ??
style.backgroundColor(context, ownMessage: ownMessage),
shape: RoundedRectangleBorder(
borderRadius: style.borderRadius,
),
Expand Down
7 changes: 4 additions & 3 deletions lib/widgets/file_widget/file_tile_widget_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ class FileTileWidgetStyle {
EdgeInsets get paddingFileTileAll =>
const EdgeInsets.only(left: 8.0, right: 16.0);

Color backgroundColor(BuildContext context, {bool ownMessage = false}) => ownMessage
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08);
Color backgroundColor(BuildContext context, {bool ownMessage = false}) =>
ownMessage
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08);

BorderRadiusGeometry get borderRadius => BorderRadius.circular(12);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ class TwakeLinkPreviewItem extends StatelessWidget {
height: TwakeLinkPreviewItemStyle.maxHeightPreviewItem,
decoration: ShapeDecoration(
color: ownMessage
? LinagoraRefColors.material().primary[95]
: LinagoraStateLayer(
LinagoraSysColors.material().surfaceTint,
).opacityLayer1,
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
TwakeLinkPreviewItemStyle.radiusBorder,
Expand Down

0 comments on commit 2ff612d

Please sign in to comment.