mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Allow the Spell Check dialog to be made much narrower than before. Fixes #1650932 [check spelling can't be resized, looks gigantic when using larger font in calibre editor.](https://bugs.launchpad.net/calibre/+bug/1650932)
This commit is contained in:
parent
535199f3f0
commit
81ea515070
@ -27,6 +27,7 @@ from calibre.gui2.languages import LanguagesEdit
|
|||||||
from calibre.gui2.progress_indicator import ProgressIndicator
|
from calibre.gui2.progress_indicator import ProgressIndicator
|
||||||
from calibre.gui2.tweak_book import dictionaries, current_container, set_book_locale, tprefs, editors
|
from calibre.gui2.tweak_book import dictionaries, current_container, set_book_locale, tprefs, editors
|
||||||
from calibre.gui2.tweak_book.widgets import Dialog
|
from calibre.gui2.tweak_book.widgets import Dialog
|
||||||
|
from calibre.gui2.widgets2 import FlowLayout
|
||||||
from calibre.spell import DictionaryLocale
|
from calibre.spell import DictionaryLocale
|
||||||
from calibre.spell.dictionary import (
|
from calibre.spell.dictionary import (
|
||||||
builtin_dictionaries, custom_dictionaries, best_locale_for_language,
|
builtin_dictionaries, custom_dictionaries, best_locale_for_language,
|
||||||
@ -1027,9 +1028,9 @@ class SpellCheck(Dialog):
|
|||||||
cs2.setToolTip(_('When filtering the list of words, be case sensitive'))
|
cs2.setToolTip(_('When filtering the list of words, be case sensitive'))
|
||||||
cs2.setChecked(tprefs['spell_check_case_sensitive_search'])
|
cs2.setChecked(tprefs['spell_check_case_sensitive_search'])
|
||||||
cs2.stateChanged.connect(self.search_type_changed)
|
cs2.stateChanged.connect(self.search_type_changed)
|
||||||
self.hb = h = QHBoxLayout()
|
self.hb = h = FlowLayout()
|
||||||
self.summary = s = QLabel('')
|
self.summary = s = QLabel('')
|
||||||
self.main.l.addLayout(h), h.addWidget(s), h.addWidget(om), h.addWidget(cs), h.addWidget(cs2), h.addStretch(1)
|
self.main.l.addLayout(h), h.addWidget(s), h.addWidget(om), h.addWidget(cs), h.addWidget(cs2)
|
||||||
|
|
||||||
def keyPressEvent(self, ev):
|
def keyPressEvent(self, ev):
|
||||||
if ev.key() in (Qt.Key_Enter, Qt.Key_Return):
|
if ev.key() in (Qt.Key_Enter, Qt.Key_Return):
|
||||||
@ -1363,6 +1364,7 @@ def find_next_error(current_editor, current_editor_name, gui_parent, show_editor
|
|||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
dictionaries.initialize()
|
dictionaries.initialize()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user