Skip to content

Commit ea7fb48

Browse files
authored
Coloured icons for select code branch dialog
1 parent 65e65ec commit ea7fb48

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎src/qualcoder/view_graph.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6121,10 +6121,8 @@ def __init__(self, app, codes, categories, parent=None):
61216121
def _add_item(self, parent, text, key, color=None):
61226122
it = QtWidgets.QTreeWidgetItem([text])
61236123
it.setData(0, QtCore.Qt.ItemDataRole.UserRole, key)
6124-
# code colour as background with contrast text (categories stay neutral)
61256124
if color:
6126-
it.setBackground(0, QtGui.QBrush(QtGui.QColor(color)))
6127-
it.setForeground(0, QtGui.QBrush(QtGui.QColor(TextColor(color).recommendation)))
6125+
it.setIcon(0, qta.icon('mdi6.square-rounded', color=QtGui.QColor(color)))
61286126
if parent is None:
61296127
self.tree.addTopLevelItem(it)
61306128
else:

0 commit comments

Comments
 (0)