Skip to content

Commit dc41035

Browse files
authored
Merge pull request #6727 from PrimozGodec/domain-editor-dark-mode
[FIX] Domain Editor - Adapt to dark mode
2 parents 88f1048 + cd3ab6a commit dc41035

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Orange/widgets/utils/domaineditor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ def data(self, index, role):
8181
if col == Column.tpe:
8282
return gui.attributeIconDict[self.vartypes.index(val) + 1]
8383
if role == Qt.ForegroundRole:
84-
if self.variables[row][Column.place] == Place.skip \
85-
and col != Column.place:
84+
if self.variables[row][Column.place] == Place.skip and col != Column.place:
8685
return QColor(160, 160, 160)
86+
# The background is light-ish, force dark text color - same as data table
87+
return self.data(index, Qt.BackgroundRole) and QColor(0, 0, 0, 200)
8788
if role == Qt.BackgroundRole:
8889
place = self.variables[row][Column.place]
8990
mapping = [Place.meta, Place.feature, Place.class_var, None]

0 commit comments

Comments
 (0)