Skip to content

Commit 5acf882

Browse files
committed
Update core.py
1 parent 4eb42fd commit 5acf882

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iblqt/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ def data(
360360
row = self._dataFrame.index[index.row()]
361361
col = index.column()
362362
if role == Qt.BackgroundRole:
363-
rgb = self._background[row][col]
364-
return QVariant(QColor.fromRgb(*rgb, self._alpha))
363+
r, g, b = self._background[row][col]
364+
return QVariant(QColor.fromRgb(r, g, b, self._alpha))
365365
if role == Qt.ForegroundRole:
366-
lum: int = self._foreground[row][col]
366+
lum = self._foreground[row][col]
367367
color = QColor('black' if (lum * self._alpha) < 32512 else 'white')
368368
return QVariant(color)
369369
return super().data(index, role)

0 commit comments

Comments
 (0)