Browse Source

fix: use surface color of colorscheme as editor's background color

Richard Shiue 2 years ago
parent
commit
aaadab434c

+ 8 - 11
frontend/app_flowy/lib/plugins/doc/document_page.dart

@@ -73,17 +73,14 @@ class _DocumentPageState extends State<DocumentPage> {
   }
 
   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<DocumentBloc>().editorState,
-          ),
-        ],
-      ),
+    return Column(
+      children: [
+        if (state.isDeleted) _renderBanner(context),
+        // AppFlowy Editor
+        _renderAppFlowyEditor(
+          context.read<DocumentBloc>().editorState,
+        ),
+      ],
     );
   }
 

+ 1 - 0
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;
 }