@@ -580,23 +580,25 @@ def graphCallback(self, ddict):
580580 'Y:%s '
581581 % (curs_xText , curs_yText , xText , yText ))
582582 qt .QToolTip .showText (self .cursor ().pos (), xy_tip )
583+ _defaultColor = qt .QApplication .instance ().palette ().color (qt .QPalette .Text ).name ()
583584 if xText == '----' :
584585 if self .getGraphCursor ():
585586 self ._xPos .setStyleSheet ("color: rgb(255, 0, 0);" )
586587 self ._yPos .setStyleSheet ("color: rgb(255, 0, 0);" )
587588 xText = curs_xText
588589 yText = curs_yText
589590 else :
590- self ._xPos .setStyleSheet ("color: rgb(0, 0, 0);" )
591- self ._yPos .setStyleSheet ("color: rgb(0, 0, 0);" )
591+ self ._xPos .setStyleSheet ("color: %s;" % _defaultColor )
592+ self ._yPos .setStyleSheet ("color: %s;" % _defaultColor )
592593 else :
593- self ._xPos .setStyleSheet ("color: rgb(0, 0, 0);" )
594- self ._yPos .setStyleSheet ("color: rgb(0, 0, 0);" )
594+ self ._xPos .setStyleSheet ("color: %s;" % _defaultColor )
595+ self ._yPos .setStyleSheet ("color: %s;" % _defaultColor )
595596 self ._xPos .setText (xText )
596597 self ._yPos .setText (yText )
597598 else :
598- self ._xPos .setStyleSheet ("color: rgb(0, 0, 0);" )
599- self ._yPos .setStyleSheet ("color: rgb(0, 0, 0);" )
599+ _defaultColor = qt .QApplication .instance ().palette ().color (qt .QPalette .Text ).name ()
600+ self ._xPos .setStyleSheet ("color: %s;" % _defaultColor )
601+ self ._yPos .setStyleSheet ("color: %s;" % _defaultColor )
600602 self ._handleMouseMovedEvent (ddict )
601603 elif ddict ['event' ] in ["curveClicked" , "legendClicked" ]:
602604 legend = ddict ["label" ]
0 commit comments