Fix some incorrect rgb specs being passed to Qt

This commit is contained in:
Kovid Goyal 2019-07-02 11:42:17 +05:30
parent 8eac004f89
commit fbc5d44435
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 6 deletions

View File

@ -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([])

View File

@ -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):

View File

@ -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)