From 0e57baf5b9f5bea1d6228140b88c99772ca6123f Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 2 Jan 2021 17:27:37 +0000 Subject: [PATCH] Desktop: Made editor padding more consistent and ensure it is present even when sidebars are gone --- .../gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.tsx | 6 ++++++ packages/app-desktop/gui/NoteEditor/NoteEditor.tsx | 9 ++++++--- .../gui/NoteEditor/NoteTitle/NoteTitleBar.tsx | 2 +- packages/lib/theme.ts | 1 + packages/renderer/noteStyle.ts | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.tsx b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.tsx index 65aa5a9ab0..198c8a4a7d 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.tsx +++ b/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.tsx @@ -387,6 +387,12 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) { padding-bottom: 400px !important; } + /* Left padding is applied at the editor component level, so we should remove it from the lines */ + .CodeMirror pre.CodeMirror-line, + .CodeMirror pre.CodeMirror-line-like { + padding-left: 0; + } + .CodeMirror-sizer { /* Add a fixed right padding to account for the appearance (and disappearance) */ /* of the sidebar */ diff --git a/packages/app-desktop/gui/NoteEditor/NoteEditor.tsx b/packages/app-desktop/gui/NoteEditor/NoteEditor.tsx index 92801b1067..8201bc2976 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteEditor.tsx +++ b/packages/app-desktop/gui/NoteEditor/NoteEditor.tsx @@ -498,9 +498,10 @@ function NoteEditor(props: NoteEditorProps) { } function renderSearchInfo() { + const theme = themeStyle(props.themeId); if (formNoteFolder && ['Search', 'Tag', 'SmartFilter'].includes(props.notesParentType)) { return ( -
+