mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix some incorrect rgb specs being passed to Qt
This commit is contained in:
parent
8eac004f89
commit
fbc5d44435
@ -66,7 +66,7 @@ class RegexBuilder(QDialog, Ui_RegexBuilder):
|
||||
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgba(0,255,0,20%); }')
|
||||
return True
|
||||
except:
|
||||
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgb(255,0,0,20%); }')
|
||||
self.regex.setStyleSheet('QLineEdit { color: black; background-color: rgba(255,0,0,20%); }')
|
||||
else:
|
||||
self.regex.setStyleSheet('QLineEdit { color: black; background-color: white; }')
|
||||
self.preview.setExtraSelections([])
|
||||
|
@ -884,10 +884,10 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
|
||||
def s_r_set_colors(self):
|
||||
if self.s_r_error is not None:
|
||||
col = 'rgb(255, 0, 0, 20%)'
|
||||
col = 'rgba(255, 0, 0, 20%)'
|
||||
self.test_result.setText(error_message(self.s_r_error))
|
||||
else:
|
||||
col = 'rgb(0, 255, 0, 20%)'
|
||||
col = 'rgba(0, 255, 0, 20%)'
|
||||
self.test_result.setStyleSheet('QLineEdit { color: black; '
|
||||
'background-color: %s; }'%col)
|
||||
for i in range(0,self.s_r_number_of_books):
|
||||
|
@ -108,7 +108,7 @@ class SearchBox2(QComboBox): # {{{
|
||||
|
||||
def __init__(self, parent=None, add_clear_action=True):
|
||||
QComboBox.__init__(self, parent)
|
||||
self.normal_background = 'rgb(255, 255, 255, 0%)'
|
||||
self.normal_background = 'rgba(255, 255, 255, 0%)'
|
||||
self.line_edit = SearchLineEdit(self)
|
||||
self.setLineEdit(self.line_edit)
|
||||
if add_clear_action:
|
||||
@ -190,7 +190,7 @@ class SearchBox2(QComboBox): # {{{
|
||||
self.clear(emit_search=False)
|
||||
return
|
||||
self._in_a_search = ok
|
||||
col = 'rgba(0,255,0,20%)' if ok else 'rgb(255,0,0,20%)'
|
||||
col = 'rgba(0,255,0,20%)' if ok else 'rgba(255,0,0,20%)'
|
||||
if not self.colorize:
|
||||
col = self.normal_background
|
||||
self.line_edit.setStyleSheet('QLineEdit{color:black;background-color:%s;}' % col)
|
||||
@ -320,7 +320,7 @@ class SavedSearchBox(QComboBox): # {{{
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QComboBox.__init__(self, parent)
|
||||
self.normal_background = 'rgb(255, 255, 255, 0%)'
|
||||
self.normal_background = 'rgba(255, 255, 255, 0%)'
|
||||
|
||||
self.line_edit = SearchLineEdit(self)
|
||||
self.setLineEdit(self.line_edit)
|
||||
|
Loading…
x
Reference in New Issue
Block a user