diff --git a/beeref/constants.py b/beeref/constants.py index 24cbd81..a3839a3 100644 --- a/beeref/constants.py +++ b/beeref/constants.py @@ -22,6 +22,7 @@ COPYRIGHT = 'Copyright © 2021-2023 Rebecca Breu' COLORS = { # Qt: 'Active:Base': (60, 60, 60), + 'Active:AlternateBase': (70, 70, 70), 'Active:Window': (40, 40, 40), 'Active:Button': (40, 40, 40), 'Active:Text': (200, 200, 200), @@ -37,6 +38,4 @@ COLORS = { 'Scene:Selection': (116, 234, 231), 'Scene:Canvas': (60, 60, 60), 'Scene:Text': (200, 200, 200), - 'Table:AlternativeRow': (70, 70, 70), - } diff --git a/beeref/widgets/settings.py b/beeref/widgets/settings.py index 1c3d44f..a117b21 100644 --- a/beeref/widgets/settings.py +++ b/beeref/widgets/settings.py @@ -322,13 +322,6 @@ class KeyboardShortcutsProxy(QtCore.QSortFilterProxyModel): self.setFilterCaseSensitivity( QtCore.Qt.CaseSensitivity.CaseInsensitive) - def data(self, index, role): - if (role == QtCore.Qt.ItemDataRole.BackgroundRole - and index.row() % 2): - return QtGui.QColor(*constants.COLORS['Table:AlternativeRow']) - else: - return super().data(index, role) - def setData(self, index, value, role, remove_from_other=None): result = self.sourceModel().setData( self.mapToSource(index), @@ -352,6 +345,7 @@ class KeyboardShortcutsView(QtWidgets.QTableView): 1, QtWidgets.QHeaderView.ResizeMode.ResizeToContents) self.setSelectionMode( QtWidgets.QHeaderView.SelectionMode.SingleSelection) + self.setAlternatingRowColors(True) settings_events.restore_keyboard_defaults.connect( self.on_restore_defaults)