mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Use standard palette for alternating table rows
This commit is contained in:
parent
052bfb9fa5
commit
2a9487a5e9
2 changed files with 2 additions and 9 deletions
|
|
@ -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),
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue