Skip to content

Commit

Permalink
Use Linagora Sys color as background
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdat committed Oct 16, 2024
1 parent 959b7e1 commit 69faef4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/pages/chat/events/reply_content_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class ReplyContentStyle {
) {
return BoxDecoration(
color: ownMessage
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08),
? LinagoraSysColors.material().primaryContainer
: LinagoraSysColors.material().onSurface.withOpacity(0.08),
borderRadius: BorderRadius.circular(12),
);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/widgets/file_widget/file_tile_widget_style.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_matrix_html/color_extension.dart';
import 'package:linagora_design_flutter/colors/linagora_ref_colors.dart';
import 'package:linagora_design_flutter/colors/linagora_sys_colors.dart';

class FileTileWidgetStyle {
const FileTileWidgetStyle();
Expand All @@ -10,8 +11,8 @@ class FileTileWidgetStyle {

Color backgroundColor(BuildContext context, {bool ownMessage = false}) =>
ownMessage
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08);
? LinagoraSysColors.material().primaryContainer
: LinagoraSysColors.material().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,8 +32,8 @@ class TwakeLinkPreviewItem extends StatelessWidget {
height: TwakeLinkPreviewItemStyle.maxHeightPreviewItem,
decoration: ShapeDecoration(
color: ownMessage
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.onSurface.withOpacity(0.08),
? LinagoraSysColors.material().primaryContainer
: LinagoraSysColors.material().onSurface.withOpacity(0.08),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
TwakeLinkPreviewItemStyle.radiusBorder,
Expand Down
2 changes: 1 addition & 1 deletion test/widget/message/twake_link_preview_item_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void main() {

expect(
twakeLinkPreviewItemBodyDecoration.color,
LinagoraRefColors.material().primary[95],
LinagoraSysColors.material().primaryContainer,
);

expect(twakeLinkPreviewItemBodyDecoration.shape, isNotNull);
Expand Down

0 comments on commit 69faef4

Please sign in to comment.