diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 9a50e7b303..1ccd7953a6 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -471,8 +471,10 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{ col = QColorDialog.getColor(Qt.black, self, _('Choose foreground color'), QColorDialog.ShowAlphaChannel) if col.isValid(): - raise NotImplementedError('TODO') - self.exec_command('foreColor', unicode_type(col.name())) + fmt = QTextCharFormat() + fmt.setForeground(QBrush(col)) + with self.editing_cursor() as c: + c.mergeCharFormat(fmt) def do_background(self): col = QColorDialog.getColor(Qt.white, self,