mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:43:40 +02:00
Nicer editor widget for editing S&R functions
This commit is contained in:
parent
64b9a921ab
commit
36deae13e9
1 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@
|
|||
from calibre.gui2.complete2 import EditWithComplete
|
||||
from calibre.gui2.tweak_book import dictionaries
|
||||
from calibre.gui2.tweak_book.widgets import Dialog
|
||||
from calibre.gui2.widgets import PythonHighlighter
|
||||
from calibre.gui2.tweak_book.editor.text import TextEdit
|
||||
from calibre.utils.config import JSONConfig
|
||||
from calibre.utils.icu import capitalize, upper, lower, swapcase
|
||||
from calibre.utils.titlecase import titlecase
|
||||
|
|
@ -216,8 +216,8 @@ def setup_ui(self):
|
|||
h.addWidget(fb, stretch=10)
|
||||
|
||||
self.la3 = la = QLabel(_('&Code:'))
|
||||
self.source_code = QPlainTextEdit(self)
|
||||
self.highlighter = PythonHighlighter(self.source_code.document())
|
||||
self.source_code = TextEdit(self)
|
||||
self.source_code.load_text('', 'python')
|
||||
la.setBuddy(self.source_code)
|
||||
l.addWidget(la), l.addWidget(self.source_code)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue