From aaadab434c2d17013b493657ace93f842868ac8b Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Mon, 14 Nov 2022 15:31:39 +0800 Subject: [PATCH] fix: use surface color of colorscheme as editor's background color --- .../lib/plugins/doc/document_page.dart | 19 ++++++++----------- .../lib/plugins/doc/editor_styles.dart | 1 + 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/frontend/app_flowy/lib/plugins/doc/document_page.dart b/frontend/app_flowy/lib/plugins/doc/document_page.dart index 81ea2cd03b..abdc3842e0 100644 --- a/frontend/app_flowy/lib/plugins/doc/document_page.dart +++ b/frontend/app_flowy/lib/plugins/doc/document_page.dart @@ -73,17 +73,14 @@ class _DocumentPageState extends State { } Widget _renderDocument(BuildContext context, DocumentState state) { - return Container( - color: Theme.of(context).colorScheme.surface, - child: Column( - children: [ - if (state.isDeleted) _renderBanner(context), - // AppFlowy Editor - _renderAppFlowyEditor( - context.read().editorState, - ), - ], - ), + return Column( + children: [ + if (state.isDeleted) _renderBanner(context), + // AppFlowy Editor + _renderAppFlowyEditor( + context.read().editorState, + ), + ], ); } diff --git a/frontend/app_flowy/lib/plugins/doc/editor_styles.dart b/frontend/app_flowy/lib/plugins/doc/editor_styles.dart index 9869ddadfa..00cbcb473e 100644 --- a/frontend/app_flowy/lib/plugins/doc/editor_styles.dart +++ b/frontend/app_flowy/lib/plugins/doc/editor_styles.dart @@ -19,6 +19,7 @@ EditorStyle customEditorTheme(BuildContext context) { bold: editorStyle.bold?.copyWith( fontWeight: FontWeight.w500, ), + backgroundColor: Theme.of(context).colorScheme.surface, ); return editorStyle; }