mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add tooltip listing all colors available
This commit is contained in:
parent
c3a2c3f458
commit
994974fb59
@ -132,6 +132,9 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
self.use_decorations.setChecked(c['display'].get('use_decorations', False))
|
self.use_decorations.setChecked(c['display'].get('use_decorations', False))
|
||||||
elif ct == '*text':
|
elif ct == '*text':
|
||||||
self.is_names.setChecked(c['display'].get('is_names', False))
|
self.is_names.setChecked(c['display'].get('is_names', False))
|
||||||
|
|
||||||
|
all_colors = [unicode(s) for s in list(QColor.colorNames())]
|
||||||
|
self.enum_colors_label.setToolTip('<p>' + ', '.join(all_colors) + '</p>')
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def shortcut_activated(self, url):
|
def shortcut_activated(self, url):
|
||||||
@ -253,7 +256,6 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
|||||||
c = [v.strip() for v in unicode(self.enum_colors.text()).split(',')]
|
c = [v.strip() for v in unicode(self.enum_colors.text()).split(',')]
|
||||||
else:
|
else:
|
||||||
c = []
|
c = []
|
||||||
print c, len(c)
|
|
||||||
if len(c) != 0 and len(c) != len(l):
|
if len(c) != 0 and len(c) != len(l):
|
||||||
return self.simple_error('', _('The colors box must be empty or '
|
return self.simple_error('', _('The colors box must be empty or '
|
||||||
'contain the same number of items as the value box'))
|
'contain the same number of items as the value box'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user