mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 06:05:20 +01:00
Implement foreground
This commit is contained in:
parent
35e531a737
commit
53caa824cf
1 changed files with 4 additions and 2 deletions
|
|
@ -471,8 +471,10 @@ def do_color(self):
|
|||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue