From fe55452c79b0eb88202d6f36fb059d652f2ac467 Mon Sep 17 00:00:00 2001 From: Aman Negi <37607224+AmanNegi@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:18:42 +0530 Subject: [PATCH] fix: restore banner theme issues (#3299) --- .../plugins/document/presentation/banner.dart | 20 +++++++++---------- .../lib/workspace/application/appearance.dart | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/banner.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/banner.dart index 49a76846a0..90acac0218 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/banner.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/banner.dart @@ -17,11 +17,12 @@ class DocumentBanner extends StatelessWidget { @override Widget build(BuildContext context) { + final colorScheme = Theme.of(context).colorScheme; return ConstrainedBox( constraints: const BoxConstraints(minHeight: 60), child: Container( width: double.infinity, - color: Theme.of(context).colorScheme.primary, + color: colorScheme.error, child: FittedBox( alignment: Alignment.center, fit: BoxFit.scaleDown, @@ -29,7 +30,8 @@ class DocumentBanner extends StatelessWidget { children: [ FlowyText.medium( LocaleKeys.deletePagePrompt_text.tr(), - color: Colors.white, + color: colorScheme.onError, + fontSize: 14, ), const HSpace(20), BaseStyledButton( @@ -37,15 +39,14 @@ class DocumentBanner extends StatelessWidget { minHeight: 40, contentPadding: EdgeInsets.zero, bgColor: Colors.transparent, - hoverColor: Theme.of(context).colorScheme.primary, highlightColor: Theme.of(context).colorScheme.primaryContainer, - outlineColor: Colors.white, + outlineColor: colorScheme.onError, borderRadius: Corners.s8Border, onPressed: onRestore, child: FlowyText.medium( LocaleKeys.deletePagePrompt_restore.tr(), - color: Theme.of(context).colorScheme.onPrimary, - fontSize: 14, + color: colorScheme.onError, + fontSize: 13, ), ), const HSpace(20), @@ -54,15 +55,14 @@ class DocumentBanner extends StatelessWidget { minHeight: 40, contentPadding: EdgeInsets.zero, bgColor: Colors.transparent, - hoverColor: Theme.of(context).colorScheme.primaryContainer, highlightColor: Theme.of(context).colorScheme.primary, - outlineColor: Colors.white, + outlineColor: colorScheme.onError, borderRadius: Corners.s8Border, onPressed: onDelete, child: FlowyText.medium( LocaleKeys.deletePagePrompt_deletePermanent.tr(), - color: Theme.of(context).colorScheme.onPrimary, - fontSize: 14, + color: colorScheme.onError, + fontSize: 13, ), ), ], diff --git a/frontend/appflowy_flutter/lib/workspace/application/appearance.dart b/frontend/appflowy_flutter/lib/workspace/application/appearance.dart index d44fe125c0..b46d47a6a9 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/appearance.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/appearance.dart @@ -341,7 +341,7 @@ class AppearanceSettingsState with _$AppearanceSettingsState { onSurface: theme.hoverFG, // grey hover color inverseSurface: theme.hoverBG3, - onError: theme.shader7, + onError: theme.onPrimary, error: theme.red, outline: theme.shader4, surfaceVariant: theme.sidebarBg,