Skip to content

Commit

Permalink
TW-2074 Update greeting background color
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdat committed Oct 16, 2024
1 parent 87ee762 commit 0eab37d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
4 changes: 3 additions & 1 deletion lib/pages/chat/chat_view_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class ChatViewBody extends StatelessWidget with MessageContentMixin {
),
Expanded(
child: Container(
color: ChatViewBodyStyle.chatViewBackgroundColor(context),
color: ChatViewBodyStyle.chatViewBackgroundColor(
context,
),
child: GestureDetector(
onTap: controller.clearSingleSelectedEvent,
child: ValueListenableBuilder(
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/chat/chat_view_body_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class ChatViewBodyStyle {
static double dividerSize = 1.0;

static Color chatViewBackgroundColor(BuildContext context) =>
responsive.isMobile(context)
? LinagoraSysColors.material().background
: LinagoraSysColors.material().onPrimary;
responsive.isMobile(context)
? LinagoraSysColors.material().background
: LinagoraSysColors.material().onPrimary;

static EdgeInsets inputBarPadding(BuildContext context) => EdgeInsets.only(
left: 8.0,
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/chat_draft/draft_chat_empty_widget.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:fluffychat/pages/chat_draft/draft_chat_empty_widget_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';

Expand All @@ -20,7 +21,7 @@ class DraftChatEmpty extends StatelessWidget {
maxWidth: 236,
),
decoration: BoxDecoration(
color: Colors.transparent,
color: DraftChatEmptyWidgetStyle.greetingButtonBackground,
borderRadius: BorderRadius.circular(16),
),
child: Column(
Expand Down
7 changes: 7 additions & 0 deletions lib/pages/chat_draft/draft_chat_empty_widget_style.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:linagora_design_flutter/colors/linagora_sys_colors.dart';

class DraftChatEmptyWidgetStyle {
static Color greetingButtonBackground =
LinagoraSysColors.material().onSurface.withOpacity(0.08);
}
7 changes: 3 additions & 4 deletions lib/pages/chat_draft/draft_chat_view.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:desktop_drop/desktop_drop.dart';
import 'package:fluffychat/pages/chat/chat_app_bar_title_style.dart';
import 'package:fluffychat/pages/chat/chat_emoji_picker.dart';
import 'package:fluffychat/pages/chat/chat_view_body_style.dart';
import 'package:fluffychat/pages/chat/chat_view_style.dart';
import 'package:fluffychat/pages/chat_draft/draft_chat.dart';
import 'package:fluffychat/pages/chat_draft/draft_chat_empty_widget.dart';
Expand Down Expand Up @@ -90,9 +91,7 @@ class DraftChatView extends StatelessWidget {
children: [
Expanded(
child: Container(
color: DraftChatViewStyle.responsive.isMobile(context)
? LinagoraSysColors.material().onPrimary
: LinagoraRefColors.material().tertiary[99],
color: ChatViewBodyStyle.chatViewBackgroundColor(context),
child: Center(
child: DropTarget(
onDragDone: (details) =>
Expand Down Expand Up @@ -121,7 +120,7 @@ class DraftChatView extends StatelessWidget {
: null,
child: Column(
children: [
const SizedBox(height: 6.0),
const SizedBox(height: 8.0),
DraftChatInputRow(
onEmojiAction: controller.onEmojiAction,
onInputBarChanged: controller.onInputBarChanged,
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/chat_draft/draft_chat_view_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DraftChatViewStyle {
);

static double bottomBarInputPadding(BuildContext context) =>
responsive.isMobile(context) ? 8.0 : 16;
responsive.isMobile(context) ? 8.0 : 8.0;

static EdgeInsetsGeometry get emptyChatChildrenPadding =>
const EdgeInsetsDirectional.only(
Expand Down

0 comments on commit 0eab37d

Please sign in to comment.