From 5d0fdb7a8024c35391541b69ebeed1c4416d6eb0 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Thu, 21 Feb 2019 21:14:28 -0500 Subject: [PATCH] fullscreen: Add option to remove spellcheck button from top panel --- manuskript/ui/editors/fullScreenEditor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manuskript/ui/editors/fullScreenEditor.py b/manuskript/ui/editors/fullScreenEditor.py index 8145f3ce..81903c14 100644 --- a/manuskript/ui/editors/fullScreenEditor.py +++ b/manuskript/ui/editors/fullScreenEditor.py @@ -61,6 +61,8 @@ class fullScreenEditor(QWidget): self.btnSpellCheck.setChecked(self.editor.spellcheck) self.btnSpellCheck.toggled.connect(self.editor.toggleSpellcheck) self.topPanel.layout().addWidget(self.btnSpellCheck) + else: + self.btnSpellCheck = None self.topPanel.layout().addStretch(1) @@ -115,6 +117,9 @@ class fullScreenEditor(QWidget): self.updateStatusBar() self.bottomPanel.layout().addSpacing(24) + + if self.btnSpellCheck: + self.topPanel.addDisplay(self.tr("Spellcheck"), 'top-spellcheck', (self.btnSpellCheck, )) self.bottomPanel.addDisplay(self.tr("Theme selector"), 'bottom-theme', (self.lstThemes, themeLabel)) self.bottomPanel.addDisplay(self.tr("Word count"), 'bottom-wc', (self.lblWC, )) self.bottomPanel.addDisplay(self.tr("Progress"), 'bottom-progress', (self.lblProgress, ))