mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Allow specifying arbitrary colors as hex triplets when creating custom columns with a fixed set of values. Fixes #1302078 [Allowing RGB colors for custom columns](https://bugs.launchpad.net/calibre/+bug/1302078)
This commit is contained in:
parent
fce3f56826
commit
f6a6ab51c5
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ def accept(self):
|
|||
return self.simple_error('', _('The colors box must be empty or '
|
||||
'contain the same number of items as the value box'))
|
||||
for tc in c:
|
||||
if tc not in QColor.colorNames():
|
||||
if tc not in QColor.colorNames() and not re.match("#(?:[0-9a-f]{3}){1,4}",tc,re.I):
|
||||
return self.simple_error('',
|
||||
_('The color {0} is unknown').format(tc))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue