Skip to content

Commit 91554a0

Browse files
Use QPalette Accent for OS highlight, switch back to bright/dark green for bools, increase contrast between red and green for values
1 parent 80fbd0c commit 91554a0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

runmanager/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ class ItemView(object):
361361
leftClicked = Signal(QtCore.QModelIndex)
362362
doubleLeftClicked = Signal(QtCore.QModelIndex)
363363

364-
COLOR_HIGHLIGHT = "#40308CC6" # Semitransparent blue TODO: Smart way to access OS highlight
365-
364+
COLOR_HIGHLIGHT = "#40308CC6" # Semitransparent blue TODO: Find a way to *safely* delete this (horrible bug otherwise)
366365
def __init__(self, *args):
367366
super(ItemView, self).__init__(*args)
368367
self._pressed_index = None
@@ -373,7 +372,8 @@ def __init__(self, *args):
373372
p.setColor(
374373
group,
375374
QtGui.QPalette.Highlight,
376-
QtGui.QColor(self.COLOR_HIGHLIGHT))
375+
p.color(QtGui.QPalette.Accent)
376+
)
377377
p.setColor(
378378
group,
379379
QtGui.QPalette.HighlightedText,
@@ -679,10 +679,10 @@ class GroupTab(object):
679679
COLOR_BOOL_ON = '#63F731' # bright green
680680
COLOR_BOOL_OFF = '#608060' # dark green
681681
elif check_if_light_or_dark() == "dark":
682-
COLOR_ERROR = "#A30000" # red
682+
COLOR_ERROR = "#BC0000" # red
683683
COLOR_OK = "#2F4C00" # green
684-
COLOR_BOOL_ON = "#3086C3" # bright blue
685-
COLOR_BOOL_OFF = "#220070" # dark blue
684+
COLOR_BOOL_ON = "#34CF00" # bright green
685+
COLOR_BOOL_OFF = "#003900" # dark green
686686
else:
687687
print(f"Unable to get color palette from os, got {check_if_light_or_dark()}")
688688

0 commit comments

Comments
 (0)