diff --git a/picard/ui/colors.py b/picard/ui/colors.py index 1f0cfeba7..2e866f6b3 100644 --- a/picard/ui/colors.py +++ b/picard/ui/colors.py @@ -47,6 +47,7 @@ _COLOR_DESCRIPTIONS = { 'log_warning': N_('Log view text (warning)'), 'profile_hl_bg': N_("Profile highlight background"), 'profile_hl_fg': N_("Profile highlight foreground"), + 'row_highlight': N_("Row Highlight"), 'tagstatus_added': N_("Tag added"), 'tagstatus_changed': N_("Tag changed"), 'tagstatus_removed': N_("Tag removed"), @@ -90,6 +91,8 @@ register_color(_DARK, 'profile_hl_fg', '#FFFFFF') register_color(_LIGHT, 'profile_hl_fg', '#000000') register_color(_DARK, 'profile_hl_bg', '#000080') register_color(_LIGHT, 'profile_hl_bg', '#F9F906') +register_color(_LIGHT, 'row_highlight', '#FFFFE0') +register_color(_DARK, 'row_highlight', '#90907E') class InterfaceColors: diff --git a/picard/ui/tablebaseddialog.py b/picard/ui/tablebaseddialog.py index b51f3e8cb..ea3dbdb97 100644 --- a/picard/ui/tablebaseddialog.py +++ b/picard/ui/tablebaseddialog.py @@ -45,7 +45,7 @@ from picard.util import ( ) from picard.ui import PicardDialog -from picard.ui.theme import theme +from picard.ui.colors import interface_colors class ResultTable(QtWidgets.QTableWidget): @@ -183,13 +183,7 @@ class TableBasedDialog(PicardDialog): def highlight_row(self, row): model = self.table.model() - highlight_color = QtGui.QColor('LightYellow') - if theme.is_dark_theme: - highlight_color.setHsv( - highlight_color.hue(), - highlight_color.saturation(), - int(highlight_color.lightness() * .6), - highlight_color.alpha()) + highlight_color = interface_colors.get_qcolor('row_highlight') highlight_brush = QtGui.QBrush(highlight_color) for column in range(0, model.columnCount()): index = model.index(row, column)