Skip to content

Commit a5f4280

Browse files
authored
Better console contrast for print() (#9)
1 parent 718f7ba commit a5f4280

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugindevtools/PluginDevTools/PluginDevToolsWidget.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,12 @@ def executeCode(self, script = None):
743743

744744

745745
item = QStandardItem( f.getvalue() )
746-
item.setForeground(QBrush(QColor('#000099')))
746+
if QtWidgets.qApp.palette().window().color().value() > QtWidgets.qApp.palette().windowText().color().value():
747+
# color for light themes
748+
item.setForeground(QBrush(QColor('#094813')))
749+
else:
750+
# color for dark themes
751+
item.setForeground(QBrush(QColor('#25DA3D')))
747752
rootItem.appendRow( item )
748753

749754
self.historyTreeView.expand(self.proxyModel.mapFromSource(rootItem.index()));

0 commit comments

Comments
 (0)